For a WebDropDown, how can I enable the displaytext area to enter text for list filtering.
Thanks Dan
The data binding sample showes an access datasource not an IEnumerable list. Do you have sample code that does this?
I getting this message when binding my List<AccountNameSearchEntity'> to the webdropdown
public
List<AccountNameSearchEntity> _acctSearchList = new List<AccountNameSearchEntity>();
drpdwnAcctSrch.Items.Clear();
drpdwnAcctSrch.DataSource = _acctSearchList;
drpdwnAcctSrch.TextField =
"ACCT_NM";
drpdwnAcctSrch.ValueField =
"ACCT_NUM";
Type 'Cigna.SUW.StopLoss.AccountNameSearchEntity' in Assembly 'StopLoss, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable
Hello Dan,
Let us know if you need further assistance.
Hi again Dan,
dropDown.DataSourceID = string.Empty;
dropDown.DataSource = this.GetProducts();
dropDown.ValueField = "ProductID";
dropDown.TextField = "ProductName";
dropDown.DataBind();
GetProducts can return any list of objects. The property names in the class name of these objects are used to map the data. I.e. if i am returning IEnumerable<Person> and the person class has a property Name , and my dropDown.TextField = "Name", it means automatically when items are bound that the item.Text will be the person's name, respectively.
Hope it helps,
Angel
I trying to bind an IEnumerable List<MyEntity> to the webdropdown. I can bind a datatable with no problem. I would like to have a sample of this type of binding.