Sheet.Cs.Gp no longer available in v13

Posted by: tedin_uriburu on 7 November 2019, 7:31 am EST

  • Posted 7 November 2019, 7:31 am EST

    Hi,

    I am migrating from v11 to v13 release, I have this code:

    var colName = _this.sheet.Cs.Gp[colIndex].name;

    working fine with v11,but I get a sheet.Cs is undefined error when using v11, how is the code now to get the column name?

    Thanks!

  • Posted 7 November 2019, 4:54 pm EST

    Hi Fernando,

    From the code snippet, it seems that you were using private property to get the column name. We strongly recommend not using private properties since they are subject to change with every build.

    For getting the column name, you could use the getValue() method like:

    var colName = sheet.getValue(0, colIndex, GC.Spread.Sheets.SheetArea.colHeader);
    

    Regards

    Sharad

  • Posted 8 November 2019, 1:42 am EST

    Good, thanks!

  • Posted 8 November 2019, 4:08 am EST

    But what I need is the column name not the column header, what is the code to get it? In my case the header texts are not the same than the field name.

    Thanks

  • Posted 10 November 2019, 6:24 pm EST

    Hi,

    You may use the getDataColumnName() method. Please refer to the following documentation for the same:

    https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.Worksheet~getDataColumnName.html

    Regards,

    Manish Gupta

Need extra support?

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

Learn More

Forum Channels