Search code examples
asp.netdatagridcheckboxitemtemplate

datagrid checkbox checked status


Hi how can we get checkbox checked status when I click submit button with a datagrid?

checkbox is with in the template column like

<asp:DataGrid ID="dgEmp" runat="server" Width="100%" Font-Size="8pt" 
GridLines="None" AutoGenerateColumns="False"                                         HeaderStyle-HorizontalAlign="Center" HeaderStyle-CssClass="heading" CellSpacing="2"
                                            Font-Names="Arial">

I'm working with Asp.net Thank you


Solution

  • You need to loop grid rows and get the checkbox from each row to get its check/uncheck status. Follow this for more info. http://www.codeproject.com/Articles/7629/Using-CheckBoxes-within-the-DataGrid-control-to-se