This is a migrated thread and some comments may be shown as answers.

Two Way Sorting only

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tariq
Top achievements
Rank 1
Tariq asked on 24 Dec 2011, 09:16 PM
Hi Support,

I have two Question: 
Q. 1 =>  I have a situation where I need only two way sorting that is Ascending OR Descending... 
In my grid if I click on column header it works like:

First Click : Ascending Order
Second Click: Descending Order
Third Click: Sorting Removed

I want on third click it should sort it again Ascending order and so on....
An example will be great help.

Q.2. =>  I saw  an example where you are handling 300,000 records in a grid that works at great speed. In that example you are binding data from some web service. 
http://demos.telerik.com/aspnet-ajax/grid/examples/client/caching/defaultcs.aspx

I have 700,000 records for a report and SQL Server 2008 as back-end. I am binding from code behind using DataSet. It is working but it is very slow... it took almost 45 seconds to retrieve data for one screen.

Can you suggest me how can I speed it up like your demo example.

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Milena
Telerik team
answered on 28 Dec 2011, 04:21 PM
Hello Tariq,

To limit the sorting modes to two-way sorting (ascending and descending), set the MasterTableView.AllowNaturalSort property or the GridTableView.AllowNaturalSort property to False. When AllowNaturalSort is False, the automatic sequence of sort modes toggles between "Ascending" and "Descending", without allowing a mode of "NoSort".

Regarding your second question, I would suggest you to review this help article, where are listed different tips for grid performance optimization.

Greetings,
Milena
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Tariq
Top achievements
Rank 1
Answers by
Milena
Telerik team
Share this question
or