User (Old forums)MemberAugust 3, 2007 at 10:14 amPost count: 23064
I have recently updated the DataGridControl, from 1.0 to 1.1:
Now, I discovered that my Grids “clears” (after a delay for a lot of seconds) the Items, when rebinding (setting the second time the ItemSource…)
Imported from legacy forums. Posted by serhio (had 392 views)User (Old forums)MemberAugust 3, 2007 at 10:23 amPost count: 23064
In fact, the number of rows remains as in a updated grid (420 in my case) , the number of columns too…
When debugging, I observed that the content of Rows is filled with data, … but in GUI I see only the empty lines..
Imported from legacy forums. Posted by serhio (had 308 views)User (Old forums)MemberAugust 3, 2007 at 2:44 pmPost count: 23064
A quick observation… if you aren’t already doing so, maybe wrapping your unbound data in DataGridCollectionView or ObservableCollection will give you a different result:
I don’t have any experience using unbound data Items collections.
Imported from legacy forums. Posted by Richard (had 311 views)User (Old forums)MemberAugust 3, 2007 at 4:36 pmPost count: 23064
After writing my earlier post, I realize you may be using ItemsSource on bounded data, but on your 2nd post the subject was truncated from “ItemsSource” to “ItemSo”, which I took to mean “Items”.
Here’s what I do to switch ItemsSource in my C# code. Note, a lot of code that creates my columns is omitted as I do this in code.
Code from a derived grid class
class MySpecialXceedGrid : DataGricControl
… code to create the grid columns and column editors for MyCollection omitted …
CollectionViewSource.GetDefaultView(MyCollection) as BindingListCollectionView;
// using IBinding list if available
// because of forum post http://forums.xceed.com/forums/ShowPost.aspx?PostID=7808
IBindingList ibl = (IBindingList)TheXpoCollection;
DataGridCollectionView dgcv = null;
if (ibl != null)
dgcv = new DataGridCollectionView(ibl);
dgcv = new DataGridCollectionView(bindingListView);
this.ItemsSource = dgcv;
this.UpdateLayout(); // not sure if this is needed
Imported from legacy forums. Posted by Richard (had 3673 views)
- You must be logged in to reply to this topic.