Hi,
I am trying to access the selected value of a radiobuttonlist which is placed inside a radgrid. The problem is that the control is directly in radgrid>MasterTableView>ItemTemplate. It is not in a TemplateColumn or anything of the sort. I tried acessing it directly through the name of the radgrid "FichaConteudo" but I get the error "Object reference not set to an instance of an object." so I figure I'm not accessing the control in the correct way. Here is part of my aspx code:
<telerik:RadGrid ID="FichaConteúdo" DataSourceID="GET_DETAILS_CONTEUDO" runat="server"
GridLines="None" MasterTableView-CommandItemStyle-BorderColor="Transparent" BorderColor="transparent" ShowHeader="False">
<MasterTableView TableLayout="Fixed" CellSpacing="-1" DataSourceID="GET_DETAILS_CONTEUDO" >
<ItemTemplate>
<p></p>
<asp:RadioButtonList ID="RadioBtnListTipo" runat="server" DataSourceID="GET_TIPOS" DataTextField="Tipo" DataValueField="Tipo" />
...
Here is how I am trying to access the control:
I am trying to access the selected value of a radiobuttonlist which is placed inside a radgrid. The problem is that the control is directly in radgrid>MasterTableView>ItemTemplate. It is not in a TemplateColumn or anything of the sort. I tried acessing it directly through the name of the radgrid "FichaConteudo" but I get the error "Object reference not set to an instance of an object." so I figure I'm not accessing the control in the correct way. Here is part of my aspx code:
<telerik:RadGrid ID="FichaConteúdo" DataSourceID="GET_DETAILS_CONTEUDO" runat="server"
GridLines="None" MasterTableView-CommandItemStyle-BorderColor="Transparent" BorderColor="transparent" ShowHeader="False">
<MasterTableView TableLayout="Fixed" CellSpacing="-1" DataSourceID="GET_DETAILS_CONTEUDO" >
<ItemTemplate>
<p></p>
<asp:RadioButtonList ID="RadioBtnListTipo" runat="server" DataSourceID="GET_TIPOS" DataTextField="Tipo" DataValueField="Tipo" />
...
Here is how I am trying to access the control:
RadioButtonList myRadioBtnListTipo = (RadioButtonList) FichaContedo.FindControl("RadioBtnListTipo");
Thank you for your help!
Marta