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???





  • Replied 8 September 2017, 2:18 pm EST


    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.


  • Replied 8 September 2017, 2:18 pm EST


    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.


  • Replied 8 September 2017, 2:18 pm EST


     Thank you, now I understand why the name was changed, <span id="result_box" class="short_text"><span>may
    be necessary to capture the name of the current DataModel before
    replace with the new DataModel</span></span>, so, th<span id="result_box" class="medium_text"><span>e name of my sheet will be
    maintained. I'll try to do this.</span></span>


    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