AspxGridView and Linq and LLBLgen

Posts   
 
    
Isz
User
Posts: 108
Joined: 26-Jan-2006
# Posted on: 20-May-2008 18:09:26   

Hello everyone...

I've been following all the drama with llblgen and devex lately, pagination issues and all that, has been interesting to read. My only comment is that all this technology is fairly new and getting all these design patterns, especially cross-vendor, to work together is a pretty amazing feat; once it all simmers down a little, things will work out.

Now that I am off my soap box... can someone provide me some clues to piecing together the AspxGridView with the LinqServerModeDataSource, and have LLBLGen power the actual queries?

We are bringing in a client that will require a heavy grid-based UI so we are exploring both devex and telerik; we have not committed to either yet. We are interested in server mode LINQ optimized queries that can provide us with filtering, grouping and summary information (we will for go the paging for now since we expect filtering to reduce our dataset).

Being a beginner in this area I understand that...

  1. The AspxGridview has a DataSourceId set to LinqServerModeDataSourceId
  2. The LinqServerModeDataSource has a ContextTypeName set to the DataContext.Name property of the *.dbml that is design from: a. The VS2008 Server Explorer designer and Linq to Sql Classes item b. or possibly with the LLBLGen designer and those new templates Frans released recently
  3. In the Page_Load or LinqServerModeDataSource_Selecting event one creates their LinqMetaData and passes in an adapter.

protected void Page_Load(object sender, EventArgs e)
{
     var query = new LinqMetaData(DataAccessAdapterFactory.CreateStandardAdapter());
}

Then things get a bit hazy for me from here.

  1. What do you bind 'query' to?
  2. Is the LLBLGenProDataSource2 still used in this mix?
  3. I have read that the LinqMetaData should be instantiated using the parameterless CTor and add the adapter after that... not clear on this.

Code snippets, examples, or any details would be very much appreciated, but I'll keep plugging away at it.

Thanks!

isz

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 21-May-2008 10:26:50   

The llblgenpro datasourcecontrol isn't used, you bypass that completely. The idea is that the grid formulates the through the LinqServerModeDataSource the query for the data it needs. The Queryable added to the LinqServerModeDataSource is the source, so extensionmethod calls are added to that so the query is formed.

This data is readonly, as the query can group/project whatever thinkable, not really something you can save back.

Frans Bouma | Lead developer LLBLGen Pro
Isz
User
Posts: 108
Joined: 26-Jan-2006
# Posted on: 21-May-2008 16:27:29   

Read only is fine, conceivably we'd be able to handle the editing ourselves, then rebind. Anyway, as per this thread...

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=13326

if we make any headway with DevExpress, we'll be sure to share it.

Thanks!