DataGrid SortCommand Will Not Fire

J

Joey

I have an asp.net 1.1 C# web application with a datagrid. I set the
datagrid's "AllowSorting" property to "True". Then I created a sort
function for it by selecting the datagrid in the designer, then the
Event button in the Properties window, and then double clicking in the
"SortCommand" box. Then in the function that was created for me, I
entered my code.

Now, the datagrid will not sort. I planted a breakpoint on the first
line of code in the sort function. When I run the application and click
one of the underlined column headers, the page does a postback, but the
sort event does not fire - the breakpoint is never hit.

I have checked in the "Region" section to make sure that the hook is
there for the sort event handler - it is. I even tried recreating the
sort function and even the datagrid itself, but that didn't work
either. I don't know what else to try. Everything is configured
properly, but it just doesn't work. I have never seen this before.

Does anyone have any ideas on how to fix this?
 
P

paul.gibson

Have you also gone into the Property Builder for the DataGrid and set
the "Sort expression" property for each of your sortable columns?
 
J

Joey

Yes, I had done that.

Anyways, I rebuilt the page from scratch and it works now. I don't know
what was going on before...it was really wierd.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top