Hi Team,
On my last posts it takes many days to get a reply. Please give a solution in this as soon as possible.
I had asked it previously, but till now there was no reply on it.
The thing is that by default the sorting is occuring as defined:
- On first click of the column header the sort will happen in ascending order.
and in second click in descending order and so and so.
But my scenario is that I want
- on first click have to sort in ascending, on second click revert back to previous condition (None as unsorted form of data - in columns as on first load) and on third click descending sort. Then on fourth unsorted and on next ascending and so and so.
So please do reply on this as soon as possible.
Thanks in advance.
Regards,
Assyst
Hi Assyst,
This is not a built in behavior of the grid. You will have to do this yourself. What you would need to do is to handle the column sorting client event and cancel it. In that event, off of the event args, you can get the column that was going to be sorted. You can see if it is sorted and if it is, then unsort it. But you would need to store yourself which direction to sort an unsorted column. You would also need to decide if you want to clear other columns' sorting if a different column is about sort. Hopefully this gets you started.
regards,
David Young
Hi Dave,
I tried this to call client side method but the method is not at all getting referred. Just getting sorted as usual.
this.wdgDataGrid1.Behaviors.CreateBehavior<Sorting>(); this.wdgDataGrid1.Behaviors.Sorting.SortingClientEvents.ColumnSorting = "wdgGrid_ColumnSorting";
I am using Infragistics35.Web.v10.2, Version=10.2.20102.2158
Please give a immediate reply.
Regards,.
Please give immediate reply on this. The client side script function for sorting is not getting called. Is that a reason with the version. Because all other client events that have been referred are working fine.
Waiting for your reply in soon. Please update on this.
Assyst,
If you require immediate assistance, you can always contact Developer Support. They are always available and would be glad to help. I do not know why that event could not be firing in your case. It should be. So, I would contact Developer Support to work on this and determine if you are doing something incorrectly or if it is a bug.
regards,David Young
If gone with this
<ig:Sorting Enabled="true" SortingMode="Single"> <SortingClientEvents ColumnSorting="wdgGrid_ColumnSorting" /> </ig:Sorting>
it's working. But as creation of behavior is dynamic I have to call it as,
And then its not working.
But for other client events its functioning for them. So any additional item is needed for this?