Since you are using class that implements ITemplate interface, I believe
that you are using a link button in the header template for sorting.
Did you set the linkBtn.CommandName = "sort"; in that class??
And this is the way I did it and its working for me.
I did not set the sort expression of each column when creating them.
I set the CommandArgument of that link button to the column name in that
class.
Then I set the OnSortCommand property of the datagrid to an event and in
that event, I get the sort expression from e.SortExpression which I pass
it to the stored procedure and bind the grid again.
And its working quite well.
Rajendra.
-----Original Message-----
From: meghanad chitre [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 16, 2004 2:40 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [AspNetAnyQuestionIsOk] sorting in datagrid for dynamic columns
hi all,
in webforms I have a datagrid.
There are ZERO columns in the datagrid at design time.
At runtime my own class which implements ITemplate
Interface
loads the columns in the datagrid.
When I create each column in I specify the
.SortExpression also.
But when it comes to actual sorting a postback happens
but the
data is not sorted.
When debugged, the SortExpression property of the
respective columns holds correct values (but data is
not sorted)
has anyone come across such a problem ?
please guide.
best regards,
--meghanad
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=129s4o8sd/M=295196.4901138.6071305.3001176/
D=groups/S=1705006764:HM/EXP=1095403234/A=2128215/R=0/SIG=10se96mf6/*htt
p:/companion.yahoo.com>
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=246119507>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
cribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/