Greetings. I'm totally perplexed at this point.
I have a webgrid that I load rows manually via creating rows and adding them at runtime, I have no bound columns, I just load some custom values i need to manipulate via code then append to the rows collection such as
Dim uwgCell As New UltraGridCell
uwgRow.Cells.Add(uwgCell)
UltraWebGridSectionsQuizzes.Rows.Add(uwgRow)
I do this for about 50 rows.
The problem is when a postback occurs the row data disappears. It's not persistant. I also group on a column which still shows correctly with the group header but the child rows show but with no data. Need help badly before I pull my hair out.
Thank you much.
It seem it is necessary to specifically declare that your row be tracked in the ViewState.
so, uwgCell As New UltraGridCell
should read uwgCell As New UltraGridCell(True) sets the row to be stored in ViewState. Haven't tried it yet but I hope this will do it.
I thought this should be the default but anyways happy coding.
Just a follow up. It works. So if you are adding any rows or columns via code and not databinding make sure to include the TRUE parameter so the grid keeps the viewstate for the data during postbacks.
Cheers.