in
Forums
Blogs
Files
Devexpress.Com
ClientCenter
Support Center
DevExpress Channel

problem witch restore layout pivotgrid from xml

Last post 8/26/2008 7:43 AM by Grzegorz Chadzynski. 0 replies.
Page 1 of 1 (1 items)
Sort Posts:
Previous Next
  • 8/26/2008 7:43 AM

    problem witch restore layout pivotgrid from xml

    Hi

    I have a problem i save the layout pivot grid be

    pivotgrid.SaveLayoutToXml(@"c:\layoutTT.xml");

    when i rstore layout be do

     for (int i = 0; i < podpivilosckolumn; i++)
     {
       if (dane.Tables[0].ColumnsIdea.ToString() != null)
       {
                            fieldsIdea = new PivotGridField();

                            fieldsIdea.FieldName = dane.Tables[0].ColumnsIdea.ToString();

                           Geeked  fieldsIdea.FieldName = dane.Tables[0].ColumnsIdea.ToString();


                            fieldsIdea.Caption = dane.Tables[0].ColumnsIdea.Caption;

                            if (dane.Tables[0].ColumnsIdea.DataType.Name == "Double")
                            {
                                fieldsIdea.ValueFormat.FormatString = "#.00";
                                fieldsIdea.ValueFormat.FormatType = DevExpress.Utils.FormatType.Custom;
                            }
                            else if (dane.Tables[0].ColumnsIdea.DataType.Name == "DateTime")
                            {
                                fieldsIdea.ValueFormat.FormatString = "yyyy-MM-dd";
                                fieldsIdea.ValueFormat.FormatType = DevExpress.Utils.FormatType.Custom;
                               
                            }
                            else if (dane.Tables[0].ColumnsIdea.DataType.Name == "Decimal")
                            {
                                fieldsIdea.ValueFormat.FormatString = "#.00";
                                fieldsIdea.ValueFormat.FormatType = DevExpress.Utils.FormatType.Custom;
                            }
                           
                            pivot.Fields.Add(fieldsIdea);
       }

     }

    pivotgrid.RestoreLayoutFromXml(@"c:\layoutTT.xml");

    restored are all data witch out position field on pivot grid. Is there any problem witch save this data or a i do somthink wrong.

    Thanks for any help

    Gretings

    Gregor

     

    HI WITCH CREW DEVEXPRESS WE FOUND THE PROBLEM I HAVE FORGET  ADD THE FIELD THE NAME.

     

    THANKS FORA ALL HELP

     

Page 1 of 1 (1 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED