ASP.NET GridView sorting on method data

Posted by husainnz on Stack Overflow See other posts from Stack Overflow or by husainnz
Published on 2010-05-25T05:58:05Z Indexed on 2010/05/25 6:01 UTC
Read the original article Hit count: 336

Hi,

I'm binding a GridView to a domain model object, this domain model object has a method for working out a formatted value to display on the grid. I'd like to use this method for my display value, which is fine, but I'd also like to be able to sort on the value returned by that method. My sort expression can only take in a property/field at the moment.

Help please! What do I need to do to get this to work?

I'm using an SPGridView actually, but that doesn't make a lot of difference to my problem.

Thanks.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about gridview