Quantcast
Viewing all articles
Browse latest Browse all 32060

How to edit the rows when the chkbox is selected?

I am having a Gridview where there is a checkbox and few other columns. The checkbox and the ID column is frozen while the other columns like vendor type,style id are not frozen.

My requirement is that when i check the chkbox,all other columns,except the frozen ones  in the selected row should change to edit mode.

Since the 1st few column is frozen,if i add an edit button there will be some overlapping and the entire gridview structure gets misplaced.

Please reply asap.

PFB the code.


<
asp:GridViewID="gvMachinegrid"runat="server"AutoGenerateColumns="False"
OnRowDataBound="gvMachinegrid_RowDataBound"DataKeyNames="StyleColorChangeTypeId"
DataSourceID="SqlDataSource1"class="FixedTables">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBoxID="SelectAllCheckBox"runat="server"onclick="SelectAll(this)"/>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBoxID="chkSelect"runat="server"OnCheckedChanged="chkSelect_checkedchanged"AutoPostBack="true"/>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundFieldDataField="StyleColorChangeTypeId"HeaderText="ID">
</asp:BoundField>
<asp:BoundFieldDataField="StyleId"HeaderText="StyleId">
</asp:BoundField>
<asp:BoundFieldDataField="ChangeTypeId"HeaderText="ChangeTypeId">
</asp:BoundField>
<asp:BoundFieldDataField="Vendor"HeaderText="Vendor">
</asp:BoundField>
</Columns>
<PagerSettingsFirstPageText="First"LastPageText="Last"Mode="NumericFirstLast"
NextPageText="First"PreviousPageText="Last"/>
<PagerStyle/>
</asp:GridView>

Viewing all articles
Browse latest Browse all 32060

Trending Articles