Hi, I have a ComboBox inside a RadGrid ItemTemplate with EnableLoadOnDemand set to true, and I can't retrieve the selected value on postback:
Everything works perfectly, each comboBox in the Grid loads the right data, etc. The only problem is that if I try to access the selected value server-side, I get an empty string. This is how I'm trying to access the value, I iterate through the GridItems of the RadGrid, and I can see the ComboBox object and its properties, but the content don't seem to persist and neither does the selected value:
Am I missing something?
Thank you.
| <telerik:GridTemplateColumn HeaderText="New Status" UniqueName="Status" AllowFiltering="False"> |
| <ItemTemplate> |
| <telerik:RadComboBox runat="Server" ID="rcbNewStatus" |
| Width="300px" |
| MarkFirstMatch = "True" |
| DataSourceID ="sqlStatusList" |
| EnableLoadOnDemand = "True" |
| HighlightTemplatedItems = "True" |
| OnClientItemsRequested="UpdateItemCountField" |
| OnItemDataBound="rcbStatus_ItemDataBound" |
| OnDataBound = "rcbStatus_DataBound" |
| OnItemsRequested="rcbStatus_ItemsRequested" |
| EnableViewState ="True" |
| > |
| <HeaderTemplate> |
| <ul> |
| <li class="col1">Status Code</li> |
| <li class="col2">Status Description</li> |
| </ul> |
| </HeaderTemplate> |
| <ItemTemplate> |
| <ul> |
| <li class="col1"><%# DataBinder.Eval(Container.DataItem, "StatusCode") %></li> |
| <li class="col2"><%# DataBinder.Eval(Container.DataItem, "StatusDesc") %></li> |
| </ul> |
| </ItemTemplate> |
| <FooterTemplate> |
| A Total of <asp:Literal runat="server" ID="rcbItemsCount" /> items |
| </FooterTemplate> |
| </telerik:RadComboBox> |
Everything works perfectly, each comboBox in the Grid loads the right data, etc. The only problem is that if I try to access the selected value server-side, I get an empty string. This is how I'm trying to access the value, I iterate through the GridItems of the RadGrid, and I can see the ComboBox object and its properties, but the content don't seem to persist and neither does the selected value:
| If TypeOf (oControl) Is RadComboBox Then |
| sStatus = CType(oControl, RadComboBox).SelectedValue |
| End If |
Am I missing something?
Thank you.