In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net pages of your web application then you can learn the use of DataTable (passing its value to Session variable to use it on different asp.net pages throughout the session) from GridView Select Multiple Rows by downloading its free C# sample code.
Checkbox CheckedChanged event handles the checkbox event that gets executed when users check or uncheck the checkbox control. In the downloadable sample code with this article you will get the code to handle the CheckedChanged event of Select All checkbox that highlights the GridView Rows to show that all rows are being selected.
The sample uses the Northwind Database to perform the demo task. You can place its connection string in web.config, ConnectionString section. If you don’t have any idea about database connections then learn it here… ASP.Net C# Database Connection
Download the C# sample code here…
ajax gridview checkbox select all.zip (3.42 kb)
Be the first to rate this post
Tags: asp.net, ajax, ajax gridview select, ajax gridview checkbox, ajax updatepanel, ajax scriptmanager, ajax sample, ajax gridview sample, asp.net ajax extensions
7/24/2008 5:21:01 PM