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

grid.LoadLayout(ms) MemoryStream

3 Answers 145 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Zbyslaw Kanik
Top achievements
Rank 1
Zbyslaw Kanik asked on 05 Nov 2009, 09:18 AM
Hi,
I found some issue. I am using BindingList bounded to RadGridView.
Using memorystream to save and restoree layout of grid.

Problem is that when i am using grid.LoadLayout(ms); layout is loading well but there is some problem with groups
Look at 2 pictures
11.png - after LoadLayout
12.png - after group header click ( status )
When i change sorting groups are displayed well.

Using nevest telerik Q3

Regards

3 Answers, 1 is accepted

Sort by
0
Zbyslaw Kanik
Top achievements
Rank 1
answered on 07 Nov 2009, 09:56 AM
Hi,
I found that issue only occurs when i have a manually added ( via designer ) image column. Rest of columns are added by databinding.
0
Accepted
Martin Vasilev
Telerik team
answered on 11 Nov 2009, 08:13 AM
Hello Zbyslaw Kanik,

Thank you for writing.

I managed to reproduce described issue. We will address it in one of the next releases. Currently you can workaround it by clearing and reloading the GroupExpression collection. Please, consider the following code block:
this.radGridView1.LoadLayout(myStream);
 
int expressionCount = this.radGridView1.MasterGridViewTemplate.GroupByExpressions.Count;
Queue<GridGroupByExpression> groupExpressions = new Queue<GridGroupByExpression>(expressionCount);
for (int i = 0; i < expressionCount; i++)
    groupExpressions.Enqueue(this.radGridView1.MasterGridViewTemplate.GroupByExpressions[i]);
this.radGridView1.MasterGridViewTemplate.GroupByExpressions.Clear();
while (groupExpressions.Count > 0)
    this.radGridView1.MasterGridViewTemplate.GroupByExpressions.Add(groupExpressions.Dequeue());

I have updated your Telerik points for bringing our attention to this. Do not hesitate to contact me again if you have any other questions.

Regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Zbyslaw Kanik
Top achievements
Rank 1
answered on 16 Nov 2009, 10:52 AM
Hi,
Thank You - is working well :)

Regards
Rafal
Tags
GridView
Asked by
Zbyslaw Kanik
Top achievements
Rank 1
Answers by
Zbyslaw Kanik
Top achievements
Rank 1
Martin Vasilev
Telerik team
Share this question
or