On Tue, 16 May 2006 12:51:04 -0400, "Carlos" <ch******@yahoo.com>
wrote:
Hi Peter,
thanks for your reply. Yes, the column is bound to a bit field, and I am
able to
place its mark on the page (i.e. does not disappear), the problem is that
when
I sort any of the columns, I miss its value because the viewstate is saved
during the not postback inside the page load event..
Thanks again,
Carlos
"PeterKellner" <pk**********@73rdstreet.com> wrote in message
news:2s********************************@4ax.com.. . On Tue, 16 May 2006 10:43:11 -0400, "Carlos" <ch******@yahoo.com>
wrote:
Hi all,
I currently have a Gridview that doess sorting correctly
using several fields. However, I do have a checkbox field
that when it is checked I do not know how to make its
value to persist when the page is sorted after it is changed.
I do handle the checkedchanged event, but I do not know
if it is there that I need to do something with the whole gridview or just
the checkbox that was checked/unchecked.
Thanks in advance,
Carlos.
Is your checked column bound to a data column? Or, Did you add that
column dynamically?
Peter Kellner
http://peterkellner.net
Carlos,
I've spent some time now trying to understand the behavior I'm seeing.
I assume you are using the SqlDataSource control. When I use that,
and bind it to a bit column (sqlserver2005), it shows text in the
columns (TRUE or FALSE). Very strange. Not what I would expect.
Truthfully, I almost never use sqldatasource. I always use strongly
typed dataset's which I find much easier and more flexible. I tried
the same thing with that, and bound it to an ObjectDataSource and the
behavior was exactly as I would have expected.
The bit column shows as a radio button, and editing works correctly,
and sorting maintains correctly as you would expect. (the update
event must do a databind under the covers for us to the viewstate).
At anyrate, I'm puzzled. I'll keep poking around. Hopefully on your
second post, someone who knows more than me will chime in.
Peter Kellner
http://peterkellner.net