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

[Solved] get value of bound cell thats a boolean

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
scott
Top achievements
Rank 1
scott asked on 11 Jun 2009, 06:59 PM
I posted earlier about the conditional change of colors for rows but specifically the issue is the values are coming up as a html space.
The value of the data-bound cells are Boolean so how do i get the value on databind when they are essentially now checkboxes?
really stuck here, any help would be appreciated.

If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = e.Item 
'how do i get the value of the Boolean databound column??? 
'this does not work - it only produces a string of " " 
if dataBoundItem("Ready").Text = x then 
end if 
 
End If 


UPDATE: figured it out. for those looking for a solution. 
If (TypeOf (e.Item) Is GridDataItem) Then 
                'Get the instance of the right type 
                Dim dataBoundItem As GridDataItem = DirectCast(e.Item, GridDataItem) 
                Dim cbPause As CheckBox = dataBoundItem("Pause").Controls.Item(0) 
'get val of check box 
 
end if 

1 Answer, 1 is accepted

Sort by
0
Accepted
Daniel
Telerik team
answered on 11 Jun 2009, 09:14 PM
Hello Scott,

There are several possible ways to get the value. I answered to your question in your older thread.
Conditional row color from code behind

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
scott
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or