Hi,
I use Janus grids and with the old 1.2005 generated code, I was able to bid this to a grid by passing the EntityCollection directly to the DataSource property of the grid.
I use teh following code in my grid control to set the datasource
private IBindingList mobjGridSource;
public IBindingList CTLDataSource
{
get {return mobjGridSource;}
set
{
mobjGridSource= value;
this.DataSource=mobjGridSource;
CTLRefetch();
}
}
Then all I did was pass the EntityCollection to the control
EntityCollection mGridSource;
this.grdItems.CTLDataSource=mGridSource;
This worked perfrctly under v1.2005 code and was just what I wanted because it did not matter what the entitycollection was a collection of.
In V2.0 code , I found that I got complie errors saying the EntityCollection can not be converted to IBindingList so I changed the code to
EntityCollection mGridSource;
this.grdItems.CTLDataSource=(IBindingList) mGridSource;
which made it compile perfectly, howere when I run the application my grids are empty!!
How do I get my grids back using V2.0 code?
Many thanks, I am sure there is a simple solution, but not being an expert I am unable to work out what
Reagrds
Huw