iDataSort not being passed properly in server-side processing

iDataSort not being passed properly in server-side processing

spooonsspooons Posts: 2Questions: 0Answers: 0
edited February 2011 in General
When using iDataSort on local static data, everything works great. Column A can be sorted using Column Ds data.

However, when using server-side processing, iSortCol_0 is being passed as the actual columns index, and not the iDataSort value for that column.

example:
assume Table [ A, B, C, D ]

A { iDataSort: 3 }

When clicking column A (index 0), the server receives iSortCol_0 = 0, not 3.

I think the iDataSort index should be passed to the server in place of the actual index clicked on.

Replies

  • spooonsspooons Posts: 2Questions: 0Answers: 0
    edited February 2011
    Ive temporarily solved my problem with the following code change. I know it works for me, for server-side processing, and im sure it will break with static data or in other scenarios - so id like to see it properly done in a future release :)

    original:
    [code]
    for ( i=0 ; i
  • ot1975ot1975 Posts: 1Questions: 0Answers: 0
    I am having a similar problem with iDataSort. I have 2 hidden columns containing the first and last name of the users in the Datatable, then I have generated a column containing the whole name and I wish to sort on this column using the hidden Last name. I get JSON formatting errors but on closer inspection I am actually getting a sql error. I am using the basic config file supplied with the server-side examples.
  • sixxttysixxtty Posts: 1Questions: 0Answers: 0
    @spoons

    Your solution worked perfect for me. I too am using server-side processing and could not get iDataSort to work. Thanks for figuring this out and posting the solution.
This discussion has been closed.