Hi,
I'm trying to see if I can migrate some of our existing UltraWebGrids to the new WebDataGrid, but I'm having one big issue: the databinding to a LLBLGenProDataSource doesn't seem to work. I created a test page with one LLBLGenProDataSourc and three grids: a WebDataGrid, a UltraWebGrid and a standard GridView. I assigned the one datasource to all of the grids (using the smarttags) and all the designtime features are available for all grids (like the columns etc). However, when I run the application, only the UltraWebGrid and the GridView contain data, and the WebDataGrid stay completely empty (the correct columns are shown however).
Do I have to do something special for this to get working with the WebDataGrid, or is it just a bug?
WebDataGrid is designed to support and tested against all type of stock .Net data sources, we haven't tested with the LLBLGenProDataSource however. Since your test works with the WebGrid and GridView, it should work with the WebDataGrid as well. Can you double check to make sure that "AutoGenerateColumns" is set to true. Try with EnableAjax set to true/false if that makes any different and same with EnableDataViewState property.
Also, try with the regular SQLDataSource control just to check to see if you can get it to use a DataSource control do display data on your pages.
-Taz.
Thanks for your reply.
"AutoGenerateColumns" is true (however, when I assign the datasource to the grid, it is set to false so I had to correct that manually). Changing the values of "EnableAjax" and "EnableDataViewState" doesn't make any difference.
A SQLDataSource is working fine, the correct data is being displayed in the WebDataGrid.
Hello Pieter
I managed to reproduce your case. However you can use the following workaround while our developers fix it. Since you did not mention which scenario you are using hence i made my test with the Adapter scenario.
1. You can use code behind binding to EntityCollection<YourCustomEntity>. Something like this:
DataAccessAdapter adapter = new DataAccessAdapter(ConfigurationManager.ConnectionStrings["Main.ConnectionString"].ConnectionString);EntityCollection<CustomersEntity> customerCollection = new EntityCollection<CustomersEntity>();adapter.FetchEntityCollection(customerCollection, null);WebDataGrid1.DataSource = customerCollection;
In this case please specify the column names, and set WebDataGrid1.AutoGenerateColumn="false".
2. Use your LLBLGenProDataSource. Set it using the design tme UI LLBLGenPro product provides. Then in Code behind add following code :
WebDataGrid1.DataSource = LLBLGenProDataSource1.Select();
And the WebDataGrid binds okay.
Hope that helps
If you have more issues do not hessitate to let us know, here or using dev support.
Christo Djambov
ASP.NET Team
Thanks Christo, the second option is working!
Now this is working, it's time for the next problem ;)
There is no design-time support for typedlist, when I bind the LLBLGenProDataSource2 (for the record, I'm using the Adapter scenario) to a typedlist, I see only 3 columns ("Databound Col0", "Databound Col1" and "Databound Col2"). The columns editor stays empy, there are no columns there. Autogenerate columns is turned on.
Is this a related problem?
Hi Pieter,
The bug is fixed and is going to be released in the next hotfix/version.
Thanks for bringing that to our attention!
Yes, most probably these are related issues. We are working on resolving them.
Thanks for reporting this, we'll keep you informed on the progress.
-Nick