So, I have a RadComboBox that is populated with a product number and a name (123456 - product name). I want to be able to type in either the product number ("123456") or the product name and have the auto complete functionality work.
I know I need to have a client side script "OnClientItemsRequesting"
I know I can probably use a [WebMethod] - probably using the <WebServiceSettings> within the Telerik RadComboBox....
I know that I need to populate the data from a database...
I know that I have to do this for 6 different combo boxes.
...but my knowledge and skill set is terrible after that.
I'm assuming that my client side script will be something like this:
My web method should be something like this:
Any help would be appreciated... I really need it.
Thanks in advance.
I know I need to have a client side script "OnClientItemsRequesting"
I know I can probably use a [WebMethod] - probably using the <WebServiceSettings> within the Telerik RadComboBox....
I know that I need to populate the data from a database...
I know that I have to do this for 6 different combo boxes.
...but my knowledge and skill set is terrible after that.
I'm assuming that my client side script will be something like this:
function OnClientItemsRequesting(sender, eventArgs) { var context = eventArgs.get_context(); context["FilterString"] = eventArgs.get_text(); }My web method should be something like this:
public RadComboBoxItemData[] GetItem1Values(object context) { //previously declared global DataBaseConnection db = new DataBaseConnection(); IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context; string filterString = ((string)contextDictionary["FilterString"]).ToLower(); string filterNext = ((string)contextDictionary["FilterNext"]); BrandCode = cmbProd1Filter.SelectedItem.Value; DataTable dt = db.StoredProcedures.getItemBumbersByBrandCode_Command(QtyUp, BrandCode); var filterRows = (from dr in dt.AsEnumerable() select dr.Field<string>("ItemName")).ToArray(); //I have no idea what happens after that... I need help }Any help would be appreciated... I really need it.
Thanks in advance.