Hi all,
I have a RADGRID:
<telerik:RadGrid ID="grdHSKT" runat="server"
onneeddatasource="grdHSKT_NeedDataSource" Skin="Office2007"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
oneditcommand="grdHSKT_EditCommand">
<MasterTableView CommandItemDisplay="TopAndBottom" TableLayout="Auto" >
<PagerStyle Mode="NextPrevAndNumeric" />
<Columns>
<telerik:GridButtonColumn UniqueName="EditColumn" ButtonType="ImageButton" CommandName="Edit" />
<telerik:GridBoundColumn DataField="TenHSKemTheo" HeaderText="Tên hồ sơ kèm theo" UniqueName="tenHSKT" DataType="System.String">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SoBanChinh" HeaderText="Bản chính" UniqueName="banChinh" DataType="System.Int32">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SoBanSao" HeaderText="Bản sao" UniqueName="banSao" DataType="System.Int32">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="GhiChu" HeaderText="Ghi chú" UniqueName="ghiChu" DataType="System.String">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Chọn">
<ItemTemplate>
<asp:Panel ID="Panel1" runat="server">
<asp:CheckBox ID="cbActive" Checked="true" runat="server" AutoPostBack="true" OnCheckedChanged="CheckedChanged" />
</asp:Panel>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings ColumnNumber="1" CaptionFormatString="Thay đổi hồ sơ kèm theo:">
<FormTemplate>
<table cellspacing="5px" cellpadding="2px">
<tr>
<td>Tên hồ sơ kèm theo: </td>
<td>
<asp:TextBox ID="txtHoSoKemTheo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TenHSKemTheo") %>' ></asp:TextBox>
</td>
</tr>
<tr>
<td>Số bản chính: </td>
<td>
<asp:TextBox ID="txtSoBanChinh" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SoBanChinh") %>' > </asp:TextBox>
</td>
</tr>
<tr>
<td>Số bản sao: </td>
<td>
<asp:TextBox ID="txtSoBanSao" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SoBanSao") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>Ghi chú: </td>
<td>
<asp:TextBox ID="txtMoTa" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "GhiChu") %>'></asp:TextBox>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowColumnsReorder="True">
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
And now I want to get checkbox have ID: cbActive into GridTemplateColumn when I call grdHSKT_EditCommand method to set enable property on it !!! But I don' know how to get it !!!
Plz help me !!! Thnks so much for any help.
I have a RADGRID:
<telerik:RadGrid ID="grdHSKT" runat="server"
onneeddatasource="grdHSKT_NeedDataSource" Skin="Office2007"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
oneditcommand="grdHSKT_EditCommand">
<MasterTableView CommandItemDisplay="TopAndBottom" TableLayout="Auto" >
<PagerStyle Mode="NextPrevAndNumeric" />
<Columns>
<telerik:GridButtonColumn UniqueName="EditColumn" ButtonType="ImageButton" CommandName="Edit" />
<telerik:GridBoundColumn DataField="TenHSKemTheo" HeaderText="Tên hồ sơ kèm theo" UniqueName="tenHSKT" DataType="System.String">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SoBanChinh" HeaderText="Bản chính" UniqueName="banChinh" DataType="System.Int32">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SoBanSao" HeaderText="Bản sao" UniqueName="banSao" DataType="System.Int32">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="GhiChu" HeaderText="Ghi chú" UniqueName="ghiChu" DataType="System.String">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Chọn">
<ItemTemplate>
<asp:Panel ID="Panel1" runat="server">
<asp:CheckBox ID="cbActive" Checked="true" runat="server" AutoPostBack="true" OnCheckedChanged="CheckedChanged" />
</asp:Panel>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings ColumnNumber="1" CaptionFormatString="Thay đổi hồ sơ kèm theo:">
<FormTemplate>
<table cellspacing="5px" cellpadding="2px">
<tr>
<td>Tên hồ sơ kèm theo: </td>
<td>
<asp:TextBox ID="txtHoSoKemTheo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TenHSKemTheo") %>' ></asp:TextBox>
</td>
</tr>
<tr>
<td>Số bản chính: </td>
<td>
<asp:TextBox ID="txtSoBanChinh" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SoBanChinh") %>' > </asp:TextBox>
</td>
</tr>
<tr>
<td>Số bản sao: </td>
<td>
<asp:TextBox ID="txtSoBanSao" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "SoBanSao") %>'></asp:TextBox>
</td>
</tr>
<tr>
<td>Ghi chú: </td>
<td>
<asp:TextBox ID="txtMoTa" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "GhiChu") %>'></asp:TextBox>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowColumnsReorder="True">
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
And now I want to get checkbox have ID: cbActive into GridTemplateColumn when I call grdHSKT_EditCommand method to set enable property on it !!! But I don' know how to get it !!!
Plz help me !!! Thnks so much for any help.