Hi,
I have populated win grid which has two band with thousand of rows, user navigated into say 500 row and working on it. My auto refresh post the new information back to the grid which cause the grid to collapse with the new information.
Is there any way, I can populate new information without collapsing the view so that user can view the information which he/she was looking earlier.
Regards
Sudarsan C.R
Hello,
From the description of your issue, it seems that you re-bind your grid, and that is why you your rows was collapsed. Instead to rebind the grid you could update your underling data source and if the data source implements INotifyPropertyChaged or you are using DataSet, grid will update displayed data. Please see attached sample.
Please let me know if you have any further questions.
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components
Thanks you very much for inputs and It helped me to acheive what I want.
In my case, I might loose the data while coming back from db because of change in status. So I retained the key value in a temp Data table (Key value is unique to identify the each row) and after assigning the data source. I loop through each row to identify the keys and set the expanded to true. Do find the code snippets below:
before refreshing the data source
For Each rw In ultragrid1.Rows
if rw.Expanded Then
DT.Rows.Add(rw.Cells("KeyValue").Value.ToString(), rw.Expanded)
End If
Next
And after setting the data source back:
strFilterValue = rw.Cells("KeyValue").Value.ToString()
strFilterQry ="LookUpColumnValue='" & strFilterValue & "'"
dtRow = ExpandDT.Select(strFilterQry)
If dtRow(0)("LookUpColumnValue") > 0 Then
rw.Expanded =True