CslaDataSource 3.0.4 usage in Design mode with VS2005

CslaDataSource 3.0.4 usage in Design mode with VS2005

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


rgyorodi posted on Sunday, February 24, 2008

I tested the following scenario with the ProjectTrackerCS and I would like to ask if I am missing something?

For the purpose of this testing I modified the ProjectList.aspx page.

I included one more GridView (GridView2) and I also included a second CslaDataSource (CslaDataSource1).

For CslaDataSource1 I set:

TypeName="ProjectTracker.Library.Admin.Roles, ProjectTracker.Library.Admin"

If I select for the datasource of GridView2 the newly created CslaDataSource1, GridView2 dissapears from the screen (only the configuration popup remains - if I click elsewhere this will dissapear also)

I also implemented the following code (for testing):

protected void CslaDataSource1_SelectObject(object sender, Csla.Web.SelectObjectArgs e)

{ e.BusinessObject = ProjectTracker.Library.Admin.Roles.GetRoles(); }

The conclusion (and my problem):

- In runtime everything seems to work fine

- In design mode I cannot choose the fields I would like to be displayed and their properties

- I tested this setup because I am working on another project with similar setup but with much more web forms and databound UI elements (mainly grids) and this means that I will have to manually code / or set the fields mappings

So is there a problem in CslaDataSource that does not allow it to work in Design mode with BO's constructed like Roles but it allows it to work with BO's constructed like ProjectList or RoleList or ResourceAssignments? If yes is there a way around the problem? If no, what I am missing here?

Regards,

Robert

RockfordLhotka replied on Sunday, February 24, 2008

You might want to use the config dialog to set the TypeName property, as it will set it correctly Wink [;)]

The problem is that TypeName requires "Type, Assembly". The Assembly you are supplying doesn't exist (ProjectTracker.Library.Admin isn't a dll).

rgyorodi replied on Monday, February 25, 2008

Thank you for your quick reply.

I noticed that after posting the problem. I would have used the config dialog but it was empty. Only after reading through almost all the posts that I found on CslaDataSource I decided to close all my VS2005 instances and rebuild. This time the combo was correctly filled and I was able to choose the correct values.

Unfortunately in my other (bigger) project the combo is not filled even if I restart the VS2005 several times, but the runtime works fine. I would also like to mention that for a correct build process and to be able to debug with Cassini at each rebuild we deploy the BO dll and the CSLA dll (we don't have CSLA in the same solution, and we are not rebuilding that) to the GAC as we are using the CSLA IPrincipal and we also stumbled across the problem with Cassini. This solution seems to fix that problem but as I mentionned before the CslaDataSource is not working in design mode - could it be this the explanation? If yes how should we configure our build/debug environment?

Regards,

Robert

Copyright (c) Marimer LLC