CheckBox in DataGrid

G

Guest

Let say i select rows of records with 4 columns from Database and want to display the data in DataGrid (ASP.NEt Server Control) with one column which must be displayed in CheckBox layout. For the column (which contains checkbox), when i click the CheckBox in the Header of DataGrid, all the rows (for column which contains Checkboxes) must be checked. When i uncheck the checkbox in Header of DataGrid, all the rows of that column must be unchecked, or when i try to manually check all the rows of records, the checkbox in Datagrid must be checked too.
My question is if i try to use Checkbox (Server Controls), i have to sacrifice for performance for flexibility (since we can check the logic in code behind) since every check of checkbox, i have to postback to server. however, according to my friend, if we try to use javascript for client-side checkbox to check for logic, the id of the client side checkbox control which we preset will be changed. Please suggest for a solution, thank u very much .
 
G

Guest

Machi
Take a look at this article
http://msdn.microsoft.com/library/d...pQuestionsAboutASPNETDataGridServerControl.as

----- Machi wrote: ----

Let say i select rows of records with 4 columns from Database and want to display the data in DataGrid (ASP.NEt Server Control) with one column which must be displayed in CheckBox layout. For the column (which contains checkbox), when i click the CheckBox in the Header of DataGrid, all the rows (for column which contains Checkboxes) must be checked. When i uncheck the checkbox in Header of DataGrid, all the rows of that column must be unchecked, or when i try to manually check all the rows of records, the checkbox in Datagrid must be checked too.
My question is if i try to use Checkbox (Server Controls), i have to sacrifice for performance for flexibility (since we can check the logic in code behind) since every check of checkbox, i have to postback to server. however, according to my friend, if we try to use javascript for client-side checkbox to check for logic, the id of the client side checkbox control which we preset will be changed. Please suggest for a solution, thank u very much .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top