|
-
Oct 19th, 2009, 03:21 AM
#1
Thread Starter
Hyperactive Member
Checkbox State in Datagrid Paging
Checkbox State in Datagrid Paging
Hi All,
In my application I have one Datagrid with a checkbox column, I want to maintain the checkbox checked state in the Paging of the datagrid and want to delete if the checkbox is checked.
Thanks in Advance....
-
Oct 19th, 2009, 03:22 AM
#2
Re: Checkbox State in Datagrid Paging
Hey,
How many rows do you return in a page?
Can you not apply the changes each time a "page" is requested, rather than keeps track of all the checkboxes across mulitple "pages"?
Gary
-
Oct 19th, 2009, 04:03 AM
#3
Thread Starter
Hyperactive Member
Re: Checkbox State in Datagrid Paging
Hi Gary,
10 rows perpage, Want to keep all the checkbox state in the datagrid.
Tell me what to do next........
-
Oct 19th, 2009, 04:10 AM
#4
Re: Checkbox State in Datagrid Paging
Hey,
If you are going to continue down this route, then I would suggest that you take a look here:
http://www.codeproject.com/KB/webfor...heckBoxes.aspx
Hope that helps!!
Gary
-
Oct 20th, 2009, 04:34 AM
#5
Thread Starter
Hyperactive Member
Re: Checkbox State in Datagrid Paging
Hi Gary,
As you told I refered the link and I changed the Datagrid control to Gridview,
But I have master page for my contentpage where the gridview is placed, so while postback the entire grid getting refresh so its again seems unchecked,
Tell me what to do for that when we have a master page and how can we proceed further.
Thanks for your reply.....
-
Oct 20th, 2009, 04:38 AM
#6
Re: Checkbox State in Datagrid Paging
Hey,
Unless I have missed something in that article, I don't see why the addition of a Master Page would cause any problems.
I would suggest, if you haven't already, do the article from start to finish as a separate application, get it working, and then port it into your existing application.
Gary
-
Oct 20th, 2009, 05:41 AM
#7
Thread Starter
Hyperactive Member
Re: Checkbox State in Datagrid Paging
Hi Gary,
I done it as a separate project and checked in all ways then only I added it to my project but while when we going to use it with the master page then it will automatically clearing all the values to load the checkboc status.
Thanks for your reply...
Give more solutions.
-
Oct 20th, 2009, 06:23 AM
#8
Re: Checkbox State in Datagrid Paging
Hey,
I am not sure if another solution is required, but rather to find out what is wrong with this one.
Have you been able to isolate where is isn't working? Have you traced to code path to see where it is falling over?
Gary
-
Oct 20th, 2009, 09:26 AM
#9
Fanatic Member
Re: Checkbox State in Datagrid Paging
 Originally Posted by sarathi125
...when we going to use it with the master page then it will automatically clearing all the values to load the checkboc status.
What values are being cleared? GridView data or ids stored in hidden field?
-
Oct 21st, 2009, 01:42 AM
#10
Thread Starter
Hyperactive Member
Re: Checkbox State in Datagrid Paging
 Originally Posted by rjv_rnjn
What values are being cleared? GridView data or ids stored in hidden field?
Hi,
IDs which are stored in the HiddenField, need to get back after the master page and content page load, then only can possible to make the gridview checkbox states as checked....
Thanks for your reply.
-
Oct 22nd, 2009, 09:24 AM
#11
Fanatic Member
Re: Checkbox State in Datagrid Paging
Can you show the code where you are storing the checked values in hidden variable and the code where you expect it to be present but don't find it? I've implemented this approach (not exactly from the article) and has never encountered an issue.
If your gridview is within update panel and the hidden field is outside the update panel then the values may not appear at Page Load even if you are assigning values on page index change. Is that the case?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|