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

[Solved] ItemDataBound and HasTable using Key Pair

1 Answer 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Inge Wandsvik
Top achievements
Rank 1
Inge Wandsvik asked on 20 May 2008, 01:53 PM
I have a RadGrid that is Databound against a HashTable. The HashTable returns a Key, and a pair of values (First and Second) like this:
<code>
Dim p As Pair = CType(EditTable(key), Pair)
p.Second = CType(DefaultTable(key), Pair).First
EditTable(key) = p
</code>
How can I define First and Second in Radgrid1_ItemDataBound? I have tried the following which does not work:
            Dim resValue As GridBoundColumn = RadGrid1.MasterTableView.GetColumn("resValue")  
            Dim resDefaultValue As GridBoundColumn = RadGrid1.MasterTableView.GetColumn("resDefaultValue")  
            Dim item As GridEditableItem = e.Item  
 
            resValue.DataField = DataBinder.Eval(CType(item.DataItem, DataRowView), "Value").First()  
            resDefaultValue.DataField = DataBinder.Eval(CType(item.DataItem, DataRowView), "Value").Second()  
 
Anyone?

1 Answer, 1 is accepted

Sort by
0
Inge Wandsvik
Top achievements
Rank 1
answered on 21 May 2008, 12:43 PM
Nevermind. I created my own Class that handles this...
Tags
Grid
Asked by
Inge Wandsvik
Top achievements
Rank 1
Answers by
Inge Wandsvik
Top achievements
Rank 1
Share this question
or