Introduction:In this article we will see how to check and uncheck all CheckBoxes present in an ASP.Net GridView control.Background: While programming many times we need to use a CheckBox control in an ASP.Net GridView for allowing selection of a particular row of a GridView. In some cases a GridView can contain 100 of records and if the user wants to select all rows of the GridView then selecting each row one by one is very tedious and a time-consuming job. To make it easier we will see how to write a simple method for selecting all CheckBoxes in a GridView. Take a look at the following snippets.
foreach (GridViewRow row in GridView1.Rows) { CheckBox chkcheck = (CheckBox)row.FindControl("chkid"); chkcheck.Checked = p; } }
AutoCompleteExtender in ASP.Net calling from database using Webservice
Export ASP.NET Gridview data into MS-Excel sheet
very good!
Thank's surender
Thanks sir