Hi
I have a problem for Selection of all rows of a grid while paging is true.
ex. page size=2
In foreach(GridviewRow gr in gridname.Rows)
here the gridname.Rows of count is 2 so how can i get the total rows of grid?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rahul BhattPosted Jul 9, 2012, 2:06 AM
Hemant KumarPosted Jul 6, 2012, 6:32 AM
Refer this link
http://sdevireddy.wordpress.com/2009/04/11/maintaining-state-of-checkboxes-in-a-gridview-with-paging/
Rahul BhattPosted Jul 6, 2012, 2:51 AM
To achieve this task,
when you check Select All , at this call server side event of CheckBox Change Event and Set Auto Postback property True,
On check change event,
Set Gridview Allow paging False,
And Bind GridView Again,
Using this you can get All Item in Page
Satyapriya NayakPosted Jul 6, 2012, 2:36 AM
Please refer the below links
http://www.highoncoding.com/Videos/697_Persisting_CheckBox_State_While_Paging_in_GridView_Control.aspx
http://technico.qnownow.com/2012/05/21/select-all-rows-when-paging-is-enabled-in-asp-net-gridview-control/
http://www.aspsnippets.com/Articles/Bulk-delete-multiple-rows-in-ASPNet-Gridview-control-using-CheckBoxes.aspx
Thanks
If this post helps you mark it as answer