i have a couple of RadComboboxs inside a GridView.
inside the RowDataBound Event of the GridView, I am doing the following:
i'm having trouble getting the ItemsRequested working. it all works fine if i run GridView.DataBind on page_load and have page_load run everytime something is typed into the combobox. unfortunately the GridView takes about 4 seconds to load, so the combobox ItemsRequested looks really slow.
if i ont GridView.DataBind in the Page_Load - and therefore, it doesn't run everytime something is typed into the combobox - the ItemsRequested Event does not run. (no doubt due to the fact my AddHandler is inside the RowDataBond event)
are there any examples you could show me where a RadCombobox is inside a GridView and is being created programatically within the RowDataBound event?
thank you for your help
inside the RowDataBound Event of the GridView, I am doing the following:
Dim cmbDispenseSize As RadComboBox = CType(e.Row.FindControl("cmbDispenseSizeAdd"), RadComboBox)bindIngredient(CType(cmbIngredient, RadComboBox), 0) 'fill the combobox with initial data AddHandler cmbDispenseSize.ItemsRequested, AddressOf cmbDispense_ItemsRequested 'add handler for ItemsReqested eventPrivate Sub cmbDispense_ItemsRequested(sender As Object, e As RadComboBoxItemsRequestedEventArgs) If Not e.Context("IngredientAddID").ToString() = "" Then Dim IngredientAddID As Integer = CInt(e.Context("IngredientAddID").ToString()) ViewState("IngredientAddID") = CInt(e.Context("IngredientAddID").ToString()) getRequestedItems(e, CType(sender, RadComboBox), 0, IngredientAddID) End If End SubPrivate Sub getRequestedItems(ByRef e As RadComboBoxItemsRequestedEventArgs, ByRef sender As RadComboBox, ByVal cmbType As Integer, Optional ByVal IngredientID As Integer = 0) Dim dt As DataTable If cmbType = 0 Then dt = _recipe.getDispenseSize(_security.UserID, IngredientID, e.Text.ToUpper) loadRequestedItems(e, "DispenseSizeName", "DispenseSizeID", dt, sender) ElseIf cmbType = 1 Then dt = _recipe.getStockItems(_security.UserID, _security.DivisionId, _recipeId, e.Text.ToUpper) loadRequestedItems(e, "StockItemName", "StockItemID", dt, sender) End If End Subi'm having trouble getting the ItemsRequested working. it all works fine if i run GridView.DataBind on page_load and have page_load run everytime something is typed into the combobox. unfortunately the GridView takes about 4 seconds to load, so the combobox ItemsRequested looks really slow.
if i ont GridView.DataBind in the Page_Load - and therefore, it doesn't run everytime something is typed into the combobox - the ItemsRequested Event does not run. (no doubt due to the fact my AddHandler is inside the RowDataBond event)
are there any examples you could show me where a RadCombobox is inside a GridView and is being created programatically within the RowDataBound event?
thank you for your help