ComponentArt Grid and LLBLgen

Posts   
 
    
Koolworld
User
Posts: 50
Joined: 10-Oct-2006
# Posted on: 17-Feb-2009 18:05:36   

Hi, i have read forums topics on this subject but wanted to check with you on how the LLBLGenProDataSource works. According to ComponentArt, their grid accepts a datasource if it implements the IEnumerable Interface - does the LLBLGenProDataSource implement this?

Apologies if this seems a stupid question but i wanted to try and get some sense out of CA about why their grid doesn't appear to work with the LLBLGenProDataSource.

Many thanks Dan

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Feb-2009 03:15:34   

From my experience and some feedbak of the users, it looks like ComponentArt is not a option: they have hardcoded codepaths for only the .net datasources. So, if you could go on another vendor, it would be nice.

LLBLGenProDataSource inherits from DataSourceControl which is enough to satisfy any well-programmed (with polymorphism) grid control.

David Elizondo | LLBLGen Support Team
Koolworld
User
Posts: 50
Joined: 10-Oct-2006
# Posted on: 18-Feb-2009 09:35:04   

Hi, Thanks for your response - yes i'm beginning to think that your advice is good regarding changing vendor as the more i try to use the CA controls the harder it becomes. I got this response back from CA support:

"If LLBLGenProDataSource inherits from DataSource, then it is a DataSource and Grid would treat it as such. I suspect things aren't quite like that though. So basically the Grid checks to make sure it's one of the basic.net types, if it is inherited from a basic type (like they say it is) it should work, if not they'll have to convert it to one of the basic types, or make sure it has IEnumerable interface, so the grid knows what to do with it."

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 18-Feb-2009 10:15:20   

Koolworld wrote:

Hi, Thanks for your response - yes i'm beginning to think that your advice is good regarding changing vendor as the more i try to use the CA controls the harder it becomes. I got this response back from CA support:

"If LLBLGenProDataSource inherits from DataSource, then it is a DataSource and Grid would treat it as such. I suspect things aren't quite like that though. So basically the Grid checks to make sure it's one of the basic.net types, if it is inherited from a basic type (like they say it is) it should work, if not they'll have to convert it to one of the basic types, or make sure it has IEnumerable interface, so the grid knows what to do with it."

err.... what did they say? frowning They have no clue what a DataSourceControl does apparently. A DataSourceControl doesn't have an IEnumerable interface, it overrides methods, like ExecuteSelect and the like. A bound grid calls these methods, which are defined on the base class (DataSourceControl). I.o.w.: their code always works with any datasourcecontrol as long as it programs against DataSourceControl's methods/properties. LLBLGenProDataSourceControl controls inherit from DataSourceControl and work with any ASP.NET control which can work with a datasourcecontrol, except theirs. The reason is this: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=2010

So I have no idea why they want an IEnumerable interface on the datasourcecontrol, as NO .NET datasourcecontrol has IEnumerable implemented (as it's stupid to do so, as DataSourceControl objects work differently). Their grid should call DataSourceControl methods, like ExecuteSelect(), ExecuteInsert etc. and utilize the data it gets back. ALL asp.net grid controls work that way, as it's the only way.

Frans Bouma | Lead developer LLBLGen Pro
Koolworld
User
Posts: 50
Joined: 10-Oct-2006
# Posted on: 19-Feb-2009 09:44:42   

Hi, thanks for the response. I have related this to CA support and have this response from them - i'm sorry for labouring this point but i really want to know why CA won't support LLBLGen - their response is:

"DataSourceControl's ExecuteSelect method is not public and cannot be called by Grid.

Grid can handle the following types and interfaces as its data source (and attempts to, in that order):

SqlDataSource ObjectDataSource IDataSource IListSource DataView DataSet DataTable IEnumerable

Note that IEnumerable is the last-resort, and most primitive, interface Grid attempts to use, but if your data source implements IDataSource or IListSource, as DataSourceControl does, there should be no problem.

Does LLBLGenProDataSourceControl implement its IDataSource's Select method, or IListSource's GetList method in a meaningful way?"

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 19-Feb-2009 11:18:00   

Koolworld wrote:

Hi, thanks for the response. I have related this to CA support and have this response from them - i'm sorry for labouring this point but i really want to know why CA won't support LLBLGen - their response is:

"DataSourceControl's ExecuteSelect method is not public and cannot be called by Grid.

Grid can handle the following types and interfaces as its data source (and attempts to, in that order):

SqlDataSource ObjectDataSource IDataSource IListSource DataView DataSet DataTable IEnumerable

Note that IEnumerable is the last-resort, and most primitive, interface Grid attempts to use, but if your data source implements IDataSource or IListSource, as DataSourceControl does, there should be no problem.

Does LLBLGenProDataSourceControl implement its IDataSource's Select method, or IListSource's GetList method in a meaningful way?"

They should code against DataSourceControl, call IDataSource.GetView, which returns a DataSourceView derived class and call Select, Update, Insert and Delete. Then every datasourcecontrol on the planet works with their grid. Our datasourcecontrols derive from DataSourceControl and the views derive from DataSourceView.

However, their code didn't do that in the past. All other webgrid controls work the same way as I described above: call GetView, it will receive a DataSourceView derived class (LLBLGenProDataSourceView(2) ) and call Select etc. on that. I don't really understand why they bother casting to SqlDataSource or ObjectDataSource as it has no value: if they simply would program against DataSourceControl, DataSourceView, both would work and all other controls as well.

But, before this thread goes off-track, did you try our datasourcecontrols with their grid and it failed? Or were you wondering if it doesn't work? As their reply suggests that it should work.

Frans Bouma | Lead developer LLBLGen Pro
Koolworld
User
Posts: 50
Joined: 10-Oct-2006
# Posted on: 19-Feb-2009 11:29:58   

Hi, thanks for the reponse. I tried to use the LLBGen datasource and it errored with a msg about it not supporting the selected datasource which is why i was emailing their support and hence this thread. I will replay your response and see what reply i get - thanks for your help.