Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > SortCommand Event in DataGrid

Reply
Thread Tools

SortCommand Event in DataGrid

 
 
Manav
Guest
Posts: n/a
 
      02-25-2004
Hi,

I am creating a datagrid control at runtime. When i set the
AutoGenerateColumns property to true the sortcommnd event gets fired but
when i set the same property to false the sortcommand event doesnot get
fired itself. Does anybody have any idea about it


Cheers,
Manav


 
Reply With Quote
 
 
 
 
Scott Mitchell [MVP]
Guest
Posts: n/a
 
      02-25-2004
Manav, do you set the SortExpression property for each of the columns you
are adding to the DataGrid? To indicate that an explicitly added column
is "sortable" you need to set its SortExpression property explicitly.
(When using AutoGenerateColumns="True", the SortExpression is
automatically set to the name of the field being bound to the column...)

Happy Programming!

--

Scott Mitchell
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!



"Manav" <(E-Mail Removed)> wrote in message
news:uNty3J4%(E-Mail Removed)...
> Hi,
>
> I am creating a datagrid control at runtime. When i set the
> AutoGenerateColumns property to true the sortcommnd event gets fired but
> when i set the same property to false the sortcommand event doesnot get
> fired itself. Does anybody have any idea about it
>
>
> Cheers,
> Manav
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SortExpression makes SortCommand event not to trig =?Utf-8?B?UGF1bA==?= ASP .Net 0 09-22-2005 06:36 PM
DataGrid SortCommand Event not fired on dynamically generated datagrid biru ASP .Net Web Controls 2 05-06-2005 01:38 PM
SortCommand and PageIndexChange event not firing sa siva via .NET 247 ASP .Net Datagrid Control 2 05-05-2005 03:07 PM
Can't Call DataGrid SortCommand Event handler Mo ASP .Net 0 01-13-2004 06:58 PM
DataGrid SortCommand event not triggered John Sturgeon ASP .Net 2 12-02-2003 07:14 PM



Advertisments