error message binding to a datagrid

error message binding to a datagrid

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


griff posted on Wednesday, September 12, 2007

Hi

I get an error message binding to a datagrid (asp.net )

<DataBinder.Eval: 'FOLibrary.DFList_ro+DFListInfo' does not contain a property with the name CaseNumber>

I am using a ReadOnlyCollectionBase called DFList with DFListInfo under CSLA 1.53

There is a property CaseNumber present but it seems that its not accessible??

Can anyone help

Many thanks

Richard

 

 

JoeFallon1 replied on Wednesday, September 12, 2007

As I recall the data binding in ASP.Net requires the use of Properties, not Fields.
Are you sure it is a real Property and not a Public Field?

Joe

 

griff replied on Wednesday, September 12, 2007

Hi

the read collection object uses a structure to hold data (as generated from codesmith) I think the bprobme lies here so I've now changed by objects to use a read only BO (to hold data) and the Read Only collection that polulates the RO.....and this works

Richard

 

 

 

JoeFallon1 replied on Thursday, September 13, 2007

I used to use Structures and later changed to embedded classes.

I recall using empty Property Set blocks for some reason.

So instead of a ReadOnly property, it would be a normal property but with nothing in the Set block so that it was essentially read only.

Maybe you could try that and see if it works.

Or forget the whole thing since your alternate solution is running.

Joe

 

Copyright (c) Marimer LLC