Datagrid sort command

Datagrid sort command

Post by Hiparc » Sat, 26 Oct 2002 21:02:59



Does anybody know why a Sort Command is not being called.
I've declared the "allow sorting" in the DataGrid and
Added the delegate to handle the event. I put a Trace.warn
inside the method but it is not being called.

Any tip ?

Thanks

 
 
 

Datagrid sort command

Post by Jim Ross [MVP » Sun, 27 Oct 2002 00:06:59


Has Viewstate been disabled for the page or the grid?


>Does anybody know why a Sort Command is not being called.
>I've declared the "allow sorting" in the DataGrid and
>Added the delegate to handle the event. I put a Trace.warn
>inside the method but it is not being called.

>Any tip ?

>Thanks

Jim Ross
MS MVP [ASP.NET][VC/MFC emeritus]

To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail

 
 
 

Datagrid sort command

Post by Hiparc » Sun, 27 Oct 2002 02:10:03


No.

In fact i generate the DataColumns dinamically. Creating
new HyperLinkColumn and adding to the DataGrida Columns
Collection. The column autogenerate is off...

The Page and DataGrid have the viewstate set to true.

>-----Original Message-----
>Has Viewstate been disabled for the page or the grid?


>>Does anybody know why a Sort Command is not being called.
>>I've declared the "allow sorting" in the DataGrid and
>>Added the delegate to handle the event. I put a
Trace.warn
>>inside the method but it is not being called.

>>Any tip ?

>>Thanks

>Jim Ross
>MS MVP [ASP.NET][VC/MFC emeritus]

>To send email, change 'lotsofspamthroughhere' to 'msn'

but please ask all questions in the newsgroups, not via
private mail

- Show quoted text -

Quote:>.

 
 
 

Datagrid sort command

Post by Jim Ross [MVP » Sun, 27 Oct 2002 06:36:40


Here are a few things to check:

* be sure you are setting a sort expression for the dynamic columns.
* are you re-creating the columns on each postback? (MS recommends
LoadViewState as a good place to do this)


>No.

>In fact i generate the DataColumns dinamically. Creating
>new HyperLinkColumn and adding to the DataGrida Columns
>Collection. The column autogenerate is off...

>The Page and DataGrid have the viewstate set to true.

>>-----Original Message-----
>>Has Viewstate been disabled for the page or the grid?


>>>Does anybody know why a Sort Command is not being called.
>>>I've declared the "allow sorting" in the DataGrid and
>>>Added the delegate to handle the event. I put a
>Trace.warn
>>>inside the method but it is not being called.

>>>Any tip ?

>>>Thanks

>>Jim Ross
>>MS MVP [ASP.NET][VC/MFC emeritus]

>>To send email, change 'lotsofspamthroughhere' to 'msn'
>but please ask all questions in the newsgroups, not via
>private mail
>>.

Jim Ross
MS MVP [ASP.NET][VC/MFC emeritus]

To send email, change 'lotsofspamthroughhere' to 'msn' but please ask all questions in the newsgroups, not via private mail

 
 
 

1. Select command/Sorting issue in ASP.net Datagrid

Hello,

If I select a row (say 5th row) in datagrid and then sort the grid for a column: selection of the row is not changed to show the previously selected row but it selects the 5th row after sorting which is obviously wrong.

Anyone faced the same problem / any solutions for this?

Thanks in advance,
Regards,
Balaji

2. Lucent winmodem connection rate drop problem

3. "adding a sort symbol" for sorting a datagrid

4. Toshiba CDrom Drive SPINDOWN

5. datagrid sort column - adding up or down arrow upon sort

6. Reliable backup devices

7. Command Sorts object?

8. Howto make own SqlException to show the error in .aspx file

9. datagrid sort (system.windows.forms.datagrid)

10. how to sort a datagrid in ascending or descending order on the sort_command event of datagrid

11. Converting a Command Event to a Sort Event?

12. Command Sorts object?

13. String Sorting vs. Numeric Sorting