This is a migrated thread and some comments may be shown as answers.

Read Boolean Column

1 Answer 52 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sanjay
Top achievements
Rank 1
Sanjay asked on 04 Mar 2008, 07:03 AM
I have bind a bit column of database into windows grid. The column shows check box, after edit the boolean column, when I am going to save the data, the boolean cell return false, while I have check the cell.
The sample code is:

For i=0 to grdMenu.RowCount-1

    Dim PAdd as Object = Nothing
    PAdd = grdMenu.Rows(i).Cell("Add").Value
Next

My bolean column name is Add.

The PAdd returns flase, whether I have checked the cell as true. I have also tried like
PAdd = grdMenu.Rows(i).Cell("Add").CellElement.Value

Please help

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 06 Mar 2008, 03:24 PM
Hi Sanjay,

That happens because you are getting the value from the cell's Value property. When a checkbox editor is clicked, its value changes while the value of the cell itself is not changed. The value of the cell will change once the user moves to another cell or presses Enter, for example.  Please, take a look at this forum post for more details:

http://www.telerik.com/community/forums/thread/b311D-bahgmh.aspx

I hope this helps. If you have any additional questions, do not hesitate to write us again.

Greetings,
Georgi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Sanjay
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or