Column headers as a row appear last

Posted by: damian.haynes on 14 December 2020, 10:32 am EST

  • Posted 14 December 2020, 10:32 am EST

    Hi there,

    Another interesting one is where you add Column names as a first row, they come out last... like it is sorted or something?

    dataTable.Rows.Add("Column1", "Column2");
    dataTable.Rows.Add("0", "Larry");
    dataTable.Rows.Add("1", "Bob");
    dataTable.Rows.Add("1", "Bob");
    dataTable.Rows.Add("2", "Tom");
    dataTable.Rows.Add("3", "Jerry");

    Column1 and Column2 are now at the last record once processed.

    thanks,
    Damian.
  • Marked as Answer

    Replied 15 December 2020, 6:29 am EST

    Hello Damian,

    Yes, by default sorting is assigned with Ascending value. So, to avoid that you should set sort "S" property on the template cell, as {{ds.Category(S=none)}}

    Thanks,
  • Replied 16 December 2020, 7:49 am EST

    Awsome thanks for that, I did try and find in the doco before asking!
  • Replied 16 December 2020, 7:49 am EST

    Awsome thanks for that, I did try and find in the doco before asking!
Need extra support?

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

Learn More

Forum Channels