Cell loosing the attributes

Posted by: bkurian on 8 September 2017, 1:20 pm EST

  • Posted 8 September 2017, 1:20 pm EST

    Hi 

    Environment -  Windows XP SP2 - .NET 3.5 , Grid Version 4.0.2003.2005 

    I have a grid with two columns. Cell types are - Date Time and Currency.

    I use the following code to populate the grid from a list. 

          public List  PaymentPlanDetails
            {
                get
                {
                   
                }
                set
                {
                    ui_fpgrid.Sheets[0].Models.Data = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(value, typeof(PaymentPlanDetail));

                }
            }

    After this code is executed, the cell type attributes are lost. What am I doing wrong?

    Thanks for the help

     


  • Replied 8 September 2017, 1:20 pm EST

    If you are referring to the fact that you are losing the DateTime and Currency cells then this would be the expected behavior because you are assigning a new DataModel to the spread in your List.  You would have to assign the DateTime and Currency cell types after the DataModel is set.
  • Replied 8 September 2017, 1:20 pm EST

    Thanks.

    Please give the code to save and restore the attributes of the cells. I set the cell types in the designer.

     

  • Replied 8 September 2017, 1:20 pm EST

    There is not a way to save the attributes of the cell without overwriting the new data model you are creating.  Once the spread is loaded with the new data model just create new instances of the DateTime and Currency cell types.  There are code examples in the help file.
  • Replied 8 September 2017, 1:20 pm EST

    Thanks Bob. Let me try.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels