Setting Column Order - MoveColumn vs Columns[x].DataField

Posted by: dougarp on 8 September 2017, 3:01 pm EST

  • Posted 8 September 2017, 3:01 pm EST

    I'm using FpSpread 5.0.3518.2008 and we persist the column ordering to the back-end so the next time the user opens the sheet, the column order is the same. 

    My question is:  What's the best way to specify the column order after binding?  

    Should I do a SheetView.MoveColumn() or SheetView.Columns[].DataField = ?

    Or is there a better way to remember/reset column ordering?

    Thanks!

    Doug 

  • Replied 8 September 2017, 3:01 pm EST

    Hello,

    When you bind a table in the dataset to Spread, then by default the Spread takes the same column order as defined in the datatable. However, if you want to bind specific columns in the datatable to some specific columns in Spread then I would suggest you to use the DataField property of the column in Spread to specify the column name in the datatable to which you would like this column to be binded to.

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 3:01 pm EST

    Thanks for the input, Manpreet.
Need extra support?

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

Learn More

Forum Channels