Row Ordering

Row Ordering

PayrollXLPayrollXL Posts: 9Questions: 3Answers: 1

Description of problem:
I have an {% If %} {% else %} {% End If %} block in my Django HTML template. After the {% End If %} I have added two rows. However, when rendered, these rows appear at the top instead of the bottom. There must something simple that I am missing in the html markup. Any ideas on this?

Thanks!
Bob

Answers

  • PayrollXLPayrollXL Posts: 9Questions: 3Answers: 1

    Okay, I'm answering my own question here. The issue was the sort order of the first column. Making sure that the values in the first column are in the correct order solved the issue.

    However, is there a way to prevent sorting by the column heading? I always want these columns to appear in the order rendered, because it shows all of the steps in a calculation in order.

    Thanks!

  • kthorngrenkthorngren Posts: 22,238Questions: 26Answers: 5,115

    Set the order option to order: [] to turn off the initial Datatables ordering. The rows will be shown in the order they are read in.

    Also you might be interested in the Absolute ordering plugin to force those rows to the top or bottom.

    Kevin

Sign In or Register to comment.