In ASPX page I have an UltraWebGrid.
I don't use paging for this case, so all records (around 10) are gonna be displayed inside the Grid.
I am supposed to set initial sorting to a particular column (called "Config Date") in descending order. To be clear, the grid should be sorted when the page is loaded without any user interaction.
How and where can I set this?
Cheers,
Alex
Thanks Ivan.
Cheers.
Normal 0 21 false false false BG X-NONE X-NONE MicrosoftInternetExplorer4
Hello
Please find the attached sample below. In the sample for data source I use Northwind sample database of Microsoft
Thanks.
Ivan Baev
Hi Ivan,
I'm afraid it didn't help. Nothing is changed after implementing this java script and setting it to being executed on load.
I changed the column ID to the proper one ("UltraWebGrid1_c_0_5") and put this line <body onload="Sort_onload();">
Is there any other setting inside UltraWebGrid that prevent this method to sort grid?
When the page is rendered, and when I click on the header of any column, sorting is performing correctly. The only problem is this initial sort that should perform on load of the page.
Any ideas?
Hello,
You can use JS code below.
function Sort_onload() {
igtbl_getGridById("UltraWebGrid1").sortColumn("UltraWebGrid1_c_0_0", false);
}
This code you can attach on onload event of the body tag.
For more information you can take a look at links below:
http://help.infragistics.com/NetAdvantage/NET/2008.3/CLR3.5/
http://samples.infragistics.com/2009.2/webfeaturebrowser/default.htm
Hope this helps.
thanks