Csla DataSource not binding

Csla DataSource not binding

Old forum URL: forums.lhotka.net/forums/t/2498.aspx


mercule posted on Friday, March 09, 2007

Yup, I've got all the newbie questions this week.  Hopefully this helps someone else down the road, too.

I'm trying to use the CslaDataSource control on an ASP.NET page and I just can't get the GridView to accept it.  I'm doing exactly what I'd do with a SQLDataSource control, plus adding in the assembly/type names.  The control inclusion is done on the page and appears to be fine.  My actual implementation of the control and datagrid match up with the book and the sample application, as far as my eyes are seeing.

I'm just plain not getting anything to show up when I try to use the CslaDataSource control.  It works great if I make a call to the target object in the Page_Load event and bind that to the gridview directly.

What can I look at to be sure I'm using the datasource control correctly?  I've been fighting with this on and off for a couple of days.

RockfordLhotka replied on Friday, March 09, 2007

Are you using version 2.1.4? Some major implementation changes are included in that version, specifically to make the CslaDataSource work in a reliable manner. The only remaining known issue is documented in the change log, along with a reasonable workaround. Additionally, 2.1.4 has a configuration dialog (click the Configure link in the grid's helper menu) to help make sure you get the assembly/type info correct.

RockfordLhotka replied on Friday, March 09, 2007

Also, you don't mention that you are handling the SelectObject event. Read Chapter 10 for details on how to actually implement code to handle that event. And the CSLA .NET Version 2.1 Handbook has examples on how to do paging and sorting if you need those features.

mercule replied on Monday, March 12, 2007

RockfordLhotka:

Also, you don't mention that you are handling the SelectObject event. Read Chapter 10 for details on how to actually implement code to handle that event. And the CSLA .NET Version 2.1 Handbook has examples on how to do paging and sorting if you need those features.

I think this is the issue.  I was reviewing your book yesterday and just about kicked myself.  I haven't had a chance to test it, yet, but it does seem the likely culprit.

I'll also check out the latest version of the framework for the updates.

Thanks, much.

Copyright (c) Marimer LLC