In my project i’m using dynamic data controls to generate lable , textbox , dropdownlist
I’m binding all values using .dbml class as using linq to sql
now when i populate my dropdown with following code it is populated all the values which is there in table Users but i want to show only some values how can i achieve that?
code:
partial class WorkFlow{}
[DisplayName("Flow")]
[DisplayColumn("FlowItem", "InitDate", true)]
public class FlowMeta
{
[Display(Name = "Trade", Order = 1)]
public WorkFlowItem WorkFlowItem { get; set; }
[Display(Name = "Users", Order = 2)]
public Users User { get; set; }
}
Here it is populating all the records from Users table and dynamically bind it to dropdownlist how can I modify this?
You can create a Function in this way in your Contorller:
You need to Perform Some Conditions in your Lambda Operations according to your requirement.
After that you can Call this Function in this way: