iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
On a Grid I allow sorting, when you click on the column header the first time to column is sorted in Ascending order, 2nd click descending order and 3rd click default order. Is it possible to change this so that on first click sort is decending and the 2nd click ascending?
Hi John,
Here's another workaround to achieve your scenario that I made through the javascript code:
<script language="javascript" type="text/javascript" id="WebGrid1_OnColumnSort"> <!-- var i = 0; function WebGrid1_OnColumnSort(controlId, columnObject) { var WebGrid1 = ISGetObject(controlId); if (i == 0) { columnObject.SortOrder = "Descending"; i = 1; } else if (i == 1) { columnObject.SortOrder = "Ascending"; i = 2; } else if (i == 2) { columnObject.SortOrder = "None"; i = 0; } return true; } --> </script>
Hope it helps.
Regards,
Lili Khiung
I am really sorry but for now, there is no property to change the sorting type order when you click the column header. But other way, you can right click the column header so that you can straight choose the order type that you want.
Thank you, I will check out the code.
Works like a charm, thank you.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname