Sortable datagrid with bound columns

Posted on 2005-04-13
Last Modified: 2010-04-07
Since I changed my datagrid to use bound columns, my on sort event no longer works even though allowsorting is set to true.

The header now appears as if allowsorting were false.


Thanks in advance...
Question by:Weller0123
    1 Comment
    LVL 18

    Accepted Solution

    Make sure you provide SortExpression in your BoundColumn like following:

    <asp:BoundColumn HeaderText="Sortable" DataField="IntegerValue" SortExpression="IntegerValue"/>


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video discusses moving either the default database or any database to a new volume.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now