Posted 8 September 2017, 3:01 pm EST<p>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. </p><p>My question is: What's the best way to specify the column order after binding? </p><p>Should I do a SheetView.MoveColumn() or SheetView.Columns[<ordinal>].DataField = <data table name>?</p><p>Or is there a better way to remember/reset column ordering?</p><p>Thanks!</p><p>Doug </p>
Setting Column Order - MoveColumn vs Columns[x].DataField
Posted by: dougarp on 8 September 2017, 3:01 pm EST
Replied 8 September 2017, 3:01 pm EST<p>Hello,</p><p>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.</p><p>Hope it will help you. Please let me know if you have any queries further.</p><p>Thanks,</p><p>Manpreet Kaur <br></p>
Replied 8 September 2017, 3:01 pm ESTThanks for the input, Manpreet.