Hi i'm have this code:
<telerik:RadGrid ID="gridprod_paso1_tab2" runat="server" Skin="Office2010Blue"
OnGroupsChanging="agrupargridprod_paso1_tab2"
OnSortCommand="reordenargridprod_paso1_tab2"
OnPageIndexChanged="cargarpagegridprod_paso1_tab2"
OnPageSizeChanged="cambiopagesizegridprod_paso1_tab2"
OnItemCommand="cambioflitrogridprod_paso1_tab2"
OnItemDataBound="itemdataboundgridprod_paso1_tab2"
OnPreRender="prerendercheckgridprod_paso1_tab2">
<PagerStyle Mode="NextPrevAndNumeric" CssClass="txt10333"/>
<AlternatingItemStyle BackColor="#EEEEEE" CssClass="txt10333"/>
<MasterTableView TableLayout="Fixed" AllowMultiColumnSorting="true" CssClass="txt10333">
<Columns>
<telerik:GridBoundColumn HeaderText="Marca de producto" Resizable="true" DataField="marca" UniqueName="marca" SortExpression="marca" FilterControlWidth="240">
<telerik:GridTemplateColumn AllowFiltering="True" HeaderText="Agregar" Groupable="false">
<FilterTemplate>
<asp:CheckBox runat="server" id="checktodosel" AutoPostBack="true" OnCheckedChanged="seltodogridprod_paso1_tab2"/>
</FilterTemplate>
<ItemTemplate>
<asp:Label runat="server" ID="lblproductoID" Text='<%# Eval("productoID") %>' Visible="false"></asp:Label>
<asp:CheckBox runat="server" ID="checkselect" CssClass="txt11333" />
</ItemTemplate>
<ItemStyle Width="80" VerticalAlign="Middle"/>
<HeaderStyle Width="80" />
</telerik:GridTemplateColumn>
</Columns>
<ItemStyle VerticalAlign="Top"/>
</MasterTableView>
<ClientSettings AllowDragToGroup="true" EnableRowHoverStyle="true"></ClientSettings> </telerik:RadGrid>
and this function
Protected Sub prerendercheckgridprod_paso1_tab2(ByVal sender As Object, ByVal e As EventArgs)
Dim item As GridFilteringItem = TryCast(gridprod_paso1_tab2.MasterTableView.GetItems(GridItemType.FilteringItem)(0), GridFilteringItem)
DirectCast(item.FindControl("checktodosel"), CheckBox).Checked = lblcheckgridprod_paso1_tab2.Text
End Sub
is easy find the checkbox "checktodosel" in event OnPreRender of the radgrid, my problem is that i don't know find this control filter outside this event, i need find it in another function that is called for another control, in my case a RadioButtonList in the event OnSelectedIndexChanged.
Thanks for your attention.
<telerik:RadGrid ID="gridprod_paso1_tab2" runat="server" Skin="Office2010Blue"
OnGroupsChanging="agrupargridprod_paso1_tab2"
OnSortCommand="reordenargridprod_paso1_tab2"
OnPageIndexChanged="cargarpagegridprod_paso1_tab2"
OnPageSizeChanged="cambiopagesizegridprod_paso1_tab2"
OnItemCommand="cambioflitrogridprod_paso1_tab2"
OnItemDataBound="itemdataboundgridprod_paso1_tab2"
OnPreRender="prerendercheckgridprod_paso1_tab2">
<PagerStyle Mode="NextPrevAndNumeric" CssClass="txt10333"/>
<AlternatingItemStyle BackColor="#EEEEEE" CssClass="txt10333"/>
<MasterTableView TableLayout="Fixed" AllowMultiColumnSorting="true" CssClass="txt10333">
<Columns>
<telerik:GridBoundColumn HeaderText="Marca de producto" Resizable="true" DataField="marca" UniqueName="marca" SortExpression="marca" FilterControlWidth="240">
<telerik:GridTemplateColumn AllowFiltering="True" HeaderText="Agregar" Groupable="false">
<FilterTemplate>
<asp:CheckBox runat="server" id="checktodosel" AutoPostBack="true" OnCheckedChanged="seltodogridprod_paso1_tab2"/>
</FilterTemplate>
<ItemTemplate>
<asp:Label runat="server" ID="lblproductoID" Text='<%# Eval("productoID") %>' Visible="false"></asp:Label>
<asp:CheckBox runat="server" ID="checkselect" CssClass="txt11333" />
</ItemTemplate>
<ItemStyle Width="80" VerticalAlign="Middle"/>
<HeaderStyle Width="80" />
</telerik:GridTemplateColumn>
</Columns>
<ItemStyle VerticalAlign="Top"/>
</MasterTableView>
<ClientSettings AllowDragToGroup="true" EnableRowHoverStyle="true"></ClientSettings> </telerik:RadGrid>
and this function
Protected Sub prerendercheckgridprod_paso1_tab2(ByVal sender As Object, ByVal e As EventArgs)
Dim item As GridFilteringItem = TryCast(gridprod_paso1_tab2.MasterTableView.GetItems(GridItemType.FilteringItem)(0), GridFilteringItem)
DirectCast(item.FindControl("checktodosel"), CheckBox).Checked = lblcheckgridprod_paso1_tab2.Text
End Sub
is easy find the checkbox "checktodosel" in event OnPreRender of the radgrid, my problem is that i don't know find this control filter outside this event, i need find it in another function that is called for another control, in my case a RadioButtonList in the event OnSelectedIndexChanged.
Thanks for your attention.