DefaultSheetDataModel Change my Sheet name

Posted by: jars on 8 September 2017, 2:18 pm EST

  • Posted 8 September 2017, 2:18 pm EST

    Why if I use DefaultSheetDataModel like this:

     

    Dim dataModel As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(DataTable)
    FpSpread1.ActiveSheet.Models.Data = dataModel

     

    The name of my sheet is changed?? why???

     

    Thanks.

     

     

  • Replied 8 September 2017, 2:18 pm EST

    Hello,


    We are unable to replicate the issue at our end as on applying the DefaultSheetDataModel the SheetName is not changing and it is same as the default SheetName i.e. Sheet1 until and unless we have changed the default SheetName.


    Please have a look at the attached sample and let us know your observations on the same.


    Thanks.


    2010/04/SheetName.zip
  • Replied 8 September 2017, 2:18 pm EST

    Jars,


    The sheet name is provided by the sheet data model (i.e. getting/setting sheetView.SheetName is equivalent to getting/setting dataModel.Name).  If you replace the existing data model with a new data model that has a different name then the sheet's name will change.


    Bobby

  • Replied 8 September 2017, 2:18 pm EST

    bobbyo,

     Thank you, now I understand why the name was changed, may
    be necessary to capture the name of the current DataModel before
    replace with the new DataModel
    , so, the name of my sheet will be
    maintained. I'll try to do this.

     

    Thanks a lot.

Need extra support?

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

Learn More

Forum Channels