(Background) We started in 2003 with the UltraWebGrid and good, ol'fashioned demand loading. When a user expanded a row, we retrieved the data from web services. Later moving to WinForms, no problem. By now, of course, we have a robust server DAL and BL that we must continue with.
With SL XamGrid I'm trying to use the same paradigm with only moderate success. We use a classic business object model with an ObservableCollection of objects, each of which includes detail properties, and an ObservableCollection of items that provide the hierarchy.
Expanding grid rows works pretty well. Before expansion, the object's hierarch Collection contains only one (null) object to get the grid to display the expansion arrow. After cancelling the RowExpansionChanging event in the handler, I dispatch a series of events that clear the null entry, and populate the data object's hierarchy list from a web service. The UI is update fine (I assume) by handling the CollectionChanged event for both the delete and adds.
If we left everything in tack, all is well. But, when we expand a row we need prune its siblings (which works), but now the objects heirarchy list has also changed.
When collapsing using either the RowExpansionChanging, or RowExpansionChanged event, the methods I dispatch to Clear, and then reload the hierarchial data don't update the UI as I (really, really) wished. Even trying to synch the grid rows with my data model doesn't work, because of course I can only access visible grid rows.
I apologize for this being so long a tedious, but I'm nearing the end on this quest and don't want to give up. It doesn't appear the Data Virtualization applies in the case.
Any help will be greatly appreciated.
Everything is worked out, thanks.
Hi,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Oh, well if you change your mind and would like to get rid of Sibling Child bands, you can do the following:
this.grid1.ColumnLayoutHeaderVisibility = ColumnLayoutHeaderVisibility.Never
And to hid your child columnLayouts:
this.grid.ColumnLayouts["SiblingColumnLayoutKey"].Visibility = Visibility.Collapsed
-SteveZ
Thank you both. The problem wasn't really supplying on-demand data for row expansion, it was that we could not delete the other collapsed siblings rows (and thus prune to the single expanded issue).
However, we've agreed to leave the siblings in place, but insure that any other expanded sibling tree is recursively collapsed. Thus, for each row level, we only allow one expanded row (and children) at a time.
Thanks, again.
Do you have some sample code that you could post, so i can try to re-create what you're doing?
Also, if you can post some screeenshots of what you're seeing.
Thanks,