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

problem / question with sorting

3 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Christian
Top achievements
Rank 1
Christian asked on 04 Mar 2009, 09:22 AM
We use RadGrid to show our data.

Some Columns should be sortable, here we have a problem:

- if we click the first time on the columnsheader
  the column will be sorted ascending and the arrow-up-symbol appears

- if we click the second time on the columnsheader
  the column will be sorted descending and the arrow-down-symbol appears

- if we click the third time on the columnsheader
  the column will be not sorted and the arrow-symbol DISappears

We only need the first to function so that we ca toogle between ascending and descending

What have I to do?

regards

Christian

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Mar 2009, 09:42 AM
Hi Christian,

Try Setting AllowNaturalSort to False so that the automatic sequence of sort modes toggles between "Ascending" and "Descending", without allowing a mode of "NoSort".
Controlling sorting modes

Thanks
Shinu
0
Christian
Top achievements
Rank 1
answered on 04 Mar 2009, 10:20 AM

I have tried the following:

 

.DataSource = GridData1     // =DataTable

.MasterTableView.SortExpressions.AllowNaturalSort = True

 

.AllowSorting =

True

 

 

 

but it doesn't work

regards
Christian

 




 

 

0
Christian
Top achievements
Rank 1
answered on 04 Mar 2009, 10:26 AM
I was wrong, I have to use False:

.MasterTableView.SortExpressions.AllowNaturalSort =

False

now it work's

Thanks for help

Christian

Tags
Grid
Asked by
Christian
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Christian
Top achievements
Rank 1
Share this question
or