Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I create a check box in gridview with all check option like gmail inbox and bind the data in gridview?

The gridview has edit option.
If I click the primary key(bookid) it will pass to another page as query string.

I want to hide the bookid in gridview and pass to the edit page.

Can anybody help me?
Posted
Updated 22-Dec-10 1:06am
v2
Comments
Dalek Dave 22-Dec-10 7:06am    
Edited for Grammar and Syntax.

Have a look to the following article, which exactly explains what you require

Selecting / Deselecting all the CheckBoxes Inside a GridView
 
Share this answer
 
"how i can create a check box in gridview with all check option like gmail inbox and bind the data"

Use CheckBoxField[^] to add a checkbox column to GridView. You can bind it's check property to a field from database. The link contains an example as well.

For Check-All functionality at client side, you can use JavaScript or jQuery to implement the same. Here is one such example: Check uncheck all checkboxes in Gridview using jQuery[^]

"the gridview has edit option"

Use a Edit, Update, Cancel CommandField[^] for adding an editing functionality to the GridView.

"if i click the the primary key(bookid) will pass to another page as query string.but i want to hid the bookid in gridview and pass to the edit page."

I didn't get exactly what you are trying to do.

I suggest you to go through this tutorial before you start programming using GridView: GridView all in one[^]

Hope this helps!
 
Share this answer
 
Comments
Dalek Dave 22-Dec-10 7:06am    
Good Answer.
 
Share this answer
 
try using this
Add checkbox to your gridview in template field set gridviews Datakeyname property to u r primary key (bookid) and assign event to checkbox which will transfer the DataKey Value to another page. Any code need feel free to ask
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900