Skip to main content

ASP.Net GridView Checkbox Column Select All using C#

You can apply the C# foreach loop to loop over each row item of GridView control and use the C# FindControl method to get the checkbox control placed inside the GridView control. Set the Checked property of each checkbox retrieved using FindControl method from each row of GridView equal to true that will select all the checkboxes placed inside the GridView control.
C# Methods Used

1. C# foreach loop
2. FindControl method



http://programming.top54u.com/post/ASP-Net-GridView-Checkbox-Select-All-using-C-sharp.aspx

Comments

Popular posts from this blog

Drawing Line Charts In asp.net

LineChart.cs import the following namespaces using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Collections; public class LineChart { public Bitmap Bitmapb; public string strTitle = "Default Title"; public ArrayList ArrayListchartValues = new ArrayList(); public float ftXorigin = 0, ftYorigin = 0; public float ftScaleX, ftScaleY; public float ftXdivs = 2, ftYdivs = 2; private int intWidth, intHeight; private Graphics Graphicsg; private Page Pagep; struct datapoint { public float ftx; public float fty; public bool bolvalid; } //initialize public LineChart(int intmyWidth, int intmyHeight, Page myPage) { intWidth = intmyWidth; intHeight = intmyHeight; ftScaleX = intmyWidth; ftScaleY = intmyHeight; Bitmapb = new Bitmap(intmyWidth, intmyHeight); Graphicsg = Graphics.FromImage(Bitmapb); Pagep = myPage; } pu...