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

Serialization of Summary Rows?

6 Answers 100 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rachel
Top achievements
Rank 2
Rachel asked on 24 Mar 2009, 05:58 AM
Hi,
I am using the SaveLayout and LoadLayout features of the grid to persist some of my grid settings, and one in particular is giving me trouble.  I would like to include the SummaryRowsBottom summary rows in my serialization, but I can't seem to get the right objects added to my SerializationMetadata collection.  I know it is possible by using the default serialization, but I am just adding the items I want to persist, so I need to add the items separately.  Could you provide an example of how to add the summary rows?

Thank you,
Rachel

6 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 24 Mar 2009, 06:01 PM
Hi Rachel,

Currently you can't use the summary rows collections with Save/Load layout functionality. We will add this issue in our TODO list and it will be addressed in one of our upcoming releases.

If you have other questions, I will be glad to answer them.

All the best,
Jack
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Rachel
Top achievements
Rank 2
answered on 15 May 2009, 02:17 PM
Hi Jack,
I saw some mention of 'persistancy support for summary rows' in the new release 2009.1 414.  Does that mean I can now save and load my summary rows with the layout?

Thanks again,
Rachel
0
Jack
Telerik team
answered on 15 May 2009, 03:53 PM
Hello Rachel,

Yes, using our latest release you can serialize the summary rows by using the SaveLayout method. If you have any other questions, I will be glad to answer.

Sincerely yours,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rachel
Top achievements
Rank 2
answered on 15 May 2009, 04:05 PM
Thanks Jack, that's great news!  Do you have an example of what I should add to my SerializationMetatdata?  I am not using the default serialization, but am instead saving only a few settings, like in the KB article here: 
0
Rachel
Top achievements
Rank 2
answered on 15 May 2009, 07:29 PM
Never mind, I figured out where my mistake was.  Here's what worked for me:

       this.radGridView1.XmlSerializationInfo.SerializationMetadata.Add(
                       typeof(GridViewTemplate),
                       "SummaryRowsBottom",
                       DesignerSerializationVisibilityAttribute.Content
                       );

                    this.radGridView1.XmlSerializationInfo.SerializationMetadata.Add(
                        typeof(GridViewSummaryRowItem),
                        "GridViewSummaryItem",
                        DesignerSerializationVisibilityAttribute.Content
                        );

                    this.radGridView1.XmlSerializationInfo.SerializationMetadata.Add(
                        typeof(GridViewSummaryItem),
                        "Aggregate",
                        DesignerSerializationVisibilityAttribute.Visible
                        );

                    this.radGridView1.XmlSerializationInfo.SerializationMetadata.Add(
                        typeof(GridViewSummaryItem),
                        "FieldName",
                        DesignerSerializationVisibilityAttribute.Visible
                        );

                    this.radGridView1.XmlSerializationInfo.SerializationMetadata.Add(
                        typeof(GridViewSummaryItem),
                        "FormatString",
                        DesignerSerializationVisibilityAttribute.Visible
                        );

Thanks!
Rachel
0
Jack
Telerik team
answered on 16 May 2009, 12:51 PM
Hi Rachel,

I am glad to hear that you have found a solution. If you have any other questions, do not hesitate to write us.

All the best,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Rachel
Top achievements
Rank 2
Answers by
Jack
Telerik team
Rachel
Top achievements
Rank 2
Share this question
or