|
-
Aug 14th, 2007, 01:25 PM
#1
Thread Starter
Fanatic Member
Allowsorting not working
Hello,
I have the Allowsorting property on my gridview set to true, but for some reason the field headings don't become the sortable links I thought they should. Anyone know why this is happening? I am usng ASP.NET 2.0 and VB 2005.
Just an FYI, I have autogenerating columns set to false.
Thanks,
Strick
Last edited by stricknyn; Aug 15th, 2007 at 10:22 AM.
-
Aug 14th, 2007, 02:36 PM
#2
Re: Allowsorting not worknig
Have you defined what data field each column header should sort by?
-
Aug 14th, 2007, 03:15 PM
#3
Hyperactive Member
Re: Allowsorting not worknig
as above and
Also you need to use a dataset not a datareader (and the xmldatasource doesn't support sorting at all)
Last edited by Rocketdawg; Aug 14th, 2007 at 03:20 PM.
Reason: almost forgot
-
Aug 15th, 2007, 09:26 AM
#4
Thread Starter
Fanatic Member
Re: Allowsorting not worknig
My gridview is bound to a datatable.
Timeshifter, if you're referring to setting the sort expression property to the datafield, yes I'm doing this. It does make the headings links, but now it errors when I click the link to sort it
Thanks,
Strick
Last edited by stricknyn; Aug 15th, 2007 at 09:29 AM.
-
Aug 15th, 2007, 10:24 AM
#5
Thread Starter
Fanatic Member
Re: Allowsorting not working
By the way, the error I get is:
The GridView 'grdComments' fired event Sorting which wasn't handled
Thanks,
Strick
-
Aug 15th, 2007, 10:50 AM
#6
Hyperactive Member
Re: Allowsorting not working
-
Sep 7th, 2007, 03:40 PM
#7
Addicted Member
Re: Allowsorting not working
Hey Stricknyn,
I just had this problem and instead of manually defining the fields, I set AutoGenerateFields=true, then my columns became sortable...
Jim P.
"The Force will be with you, always."
--Ben Kenobi--
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|