CodeSmith Community
Your Code. Your Way. Faster!

The GridView 'xyz' fired event Sorting which wasn't handled.

Latest post 07-19-2007 3:09 PM by zeus. 1 replies.
  • 07-19-2007 2:42 PM

    • zeus
    • Top 200 Contributor
    • Joined on 05-10-2006
    • Posts 25
    • Points 330

    The GridView 'xyz' fired event Sorting which wasn't handled.

    Hello.  I am receiving this unhandled exception when I attemp to bind an EntityGridView programmatically.  If I bind to a standard GridView, it work fine; however, I loose any additional functionality that the EntityGridView provides.  I've been debugging for hours and cannot for the life of me get beyond this issue.  Below is an example of what I am attempting to accomplish:

    aspx: 

    <data:EntityGridView ID="GridView1" runat="server"></data:EntityGridView>

    code-behind:

    private void BindData ()

      {

        PlayerLaxStatsService svc = new PlayerLaxStatsService();

        TList<PlayerLaxStats> stats = svc.GetByPlayerIdFromPlayerPlayerLaxStats(1);

        this.GridView1.DataSource = stats;

        this.GridView1.DataBind();

      }

     

    Any help will be greatly appreciated.

     

    Thanks, -Dan

    • Post Points: 5
  • 07-19-2007 3:09 PM In reply to

    • zeus
    • Top 200 Contributor
    • Joined on 05-10-2006
    • Posts 25
    • Points 330

    Re: The GridView 'xyz' fired event Sorting which wasn't handled.

    Reading over the EntityGridView source code, it appears that you must databind only with a class that derives from the DataSourceControl.  While I'm impressed with the quality and resources that when into developing nettiers, I don't quite understand why the EGV was implemented this way.  It's either declaratively databind, or use another Grid control...  Can anyone shed some light on the this implementation decision?

    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems