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

[Solved] Keep grid open on rebind()

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jtawja
Top achievements
Rank 1
jtawja asked on 24 Apr 2008, 10:44 PM
I have some code that will keep the grid open on a rebind, but it is only on the first level of a hierachical grid.  I have a grid that had 3 layers to it and on an insert, the grid gets rebound, how can I keep the 2nd and 3rd level open.  Then code I use for the first level is:

Private

Sub SelectInsertedRecord(ByVal ID As String)

Dim item As GridDataItem

For Each item In Me.dgBuilderProject.Items

If item.Item("ProjectId").Text = ID Then

item.Selected =

True

item.Expanded =

True

Exit For

End If

Next

End Sub 'SelectInsertedRecord


Any help would be appreciated!!!

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Apr 2008, 03:51 AM
Hi,

Go through the following code library link.
Retain expanded/selected state in hierarchy on rebind

Thanks
Shinu.
Tags
Grid
Asked by
jtawja
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or