Hello,
I need to modify a server control from within my grid's ItemCommand event handler. The example below is simplified as much as I can.
Below, I have an asp:label control inside a NestedItemView in my grid. The label's text property is set in my markup code.
When i expand the row (making the nested view visible), I want to modify the label.text property.
With the code below, when I expand the FIRST row in my grid, the label's text property is modified as it shoud. When I expand other rows, their labels' text properties are not modified.
I know this is a dumb example, but my real-world problem is too muddy to explain here. :-)
Any help appreciated.
Jeppe Jespersen
Denmark
I need to modify a server control from within my grid's ItemCommand event handler. The example below is simplified as much as I can.
Below, I have an asp:label control inside a NestedItemView in my grid. The label's text property is set in my markup code.
When i expand the row (making the nested view visible), I want to modify the label.text property.
With the code below, when I expand the FIRST row in my grid, the label's text property is modified as it shoud. When I expand other rows, their labels' text properties are not modified.
I know this is a dumb example, but my real-world problem is too muddy to explain here. :-)
| Protected Sub radGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles radGrid1.ItemCommand |
| Dim nv As GridNestedViewItem = radGrid1.MasterTableView.GetItems(GridItemType.NestedView)(0) |
| Dim tmpLabel As Label = CType(nv.Controls(1).Controls(0).FindControl("lblTest"), Label) |
| tmpLabel.Text += "_bob" |
| End Sub |
Any help appreciated.
Jeppe Jespersen
Denmark