or
FilterExpression filter = new FilterExpression(); |
| filter.Predicates.Add(FilterExpression.BinaryOperation.AND, |
| GridKnownFunction.Contains, |
| "@FilterEditor1"); |
| filter.Parameters.Add("@FilterEditor1", "rgvKeyword.CurrentRow.Cells[0].Value"); |
| rgvEmails.Columns["tk_name"].Filter = filter; |
| public AListControl() |
| { |
| InitializeComponent(); |
| // Create dummy BListControl |
| BListControl bListControl = new BListControl(); |
| // Add the B's MasterGridViewTemplate to A as a ChildGridViewTemplates |
| this.radGridViewA.MasterGridViewTemplate.ChildGridViewTemplates.Add( |
| bListControl.radGridViewB.MasterGridViewTemplate); |
| // Add the relation |
| GridViewRelation relation = new GridViewRelation(this.radGridViewA.MasterGridViewTemplate); |
| relation.ChildTemplate = bListControl.radGridViewB.MasterGridViewTemplate; |
| relation.RelationName = "A2B"; |
| relation.ParentColumnNames.Add("Id"); |
| relation.ChildColumnNames.Add("B.AId"); |
| this.radGridViewA.Relations.Add(relation); |
| } |

RadLabel5.Text =
"Selected S.No :" & e.Row.Cells("serialno").Value & " - " & e.Row.Cells("name").Value.ToString
I have setup a Hierarchical Grid programmatically basically following the example in the Documentation. Now I need to update some Cells in the ChildGridView programmatically and assumed I can update the cell info with the following:
| '-- The ChildGridView has already been populated with data |
| Dim cTemplate As GridViewTemplate = GridViewPricing.MasterGridViewTemplate.ChildGridViewTemplates(0) |
| 'The following throws an error : |
| 'Object reference not set to an instance of an object. |
| cTemplate.Rows(0).Cells(1).Value="somedata" |

| Public Class RadForm1 |
| Private Sub RadForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load |
| 'TODO: This line of code loads data into the 'WODataset.WorkOrderMain' table. You can move, or remove it, as needed. |
| Me.WorkOrderMainTableAdapter.Fill(Me.WODataset.WorkOrderMain) |
| RadDropDownButton1.Items.Add(WODataset.WorkOrderMain.techFullNameColumn) |
| RadComboBox1.Items.Add(WODataset.WorkOrderMain.techFullNameColumn) |
| End Sub |
| End Class |