Author Topic: Ignoring empty rows when sorting  (Read 3545 times)

ksoerens

  • Newbie
  • *
  • Posts: 4
    • View Profile
Ignoring empty rows when sorting
« on: November 18, 2014, 11:40:26 pm »
When using the grid I always leave at least one empty row at the bottom, making it easy to fill in extra data.

But when clicking on a column header and getting the grid sorted, then the empty row gets sorted as well which isn't surprising of course. But not necessarily always what you want to be happening.

So may I suggest a future sorting option to be added, like 'ignoreEmpyRows'.... and maybe implemented in a way which moves ALL empty rows to the bottom upon sorting, no matter which way the sorting order is.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6210
    • View Profile
Re: Ignoring empty rows when sorting
« Reply #1 on: November 19, 2014, 12:01:14 am »
You could also detach the last empty row from dataModel.data in beforeSort and append it back in sort event.