This is a migrated thread and some comments may be shown as answers.

Rebind data to radGrid with user control and entitydatasource

3 Answers 196 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Julian
Top achievements
Rank 1
Julian asked on 10 Jun 2014, 06:08 PM
I have reviewed your demo on Edit Form Types. Specifically where a custom user control is utilized for the edit functionality. I am using WebForms with EF6. So my grids are populated by entity models.

So my question is how do I rebind the grid after editing a row with my custom user control? I believe the live samples supposedly had a solution for this but I couldn't get my live samples to work locally (sql issue). Can you provide me with a sample where the data source is a entity framework datasource (EntityDataSource)?

Thanks,

Julian

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 16 Jun 2014, 11:20 AM
Hi Julian,

I would suggest you to review the online demos below which demonstrates the required approach.
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultcs.aspx#qsf-demo-source
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/automatic-crud-operations/defaultcs.aspx

You could isolate the demos and run them locally using the demo isolating steps below:
http://demos.telerik.com/aspnet-ajax/Common/QSFInstructions/Instructions.html

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Julian
Top achievements
Rank 1
answered on 18 Jun 2014, 05:48 PM
These first demo shows a custom user control binding data using a SQL datasource. I simply want to see what the code behind of the user custom control would look like when the datasource is a entitydatasource. Telerik responses always tend to fall into the category of "look at this demo". This is fine but most of your demos deal with the most simplistic of applications. In this instance I have a simple question. I'm not a senior developer and It could take me some time to try and bridge the gap here. I would much prefer a simply example of your user control binding to a entitydatasource.

Thanks,

0
Viktor Tachev
Telerik team
answered on 23 Jun 2014, 02:04 PM
Hello Julian,

The approach you need to use combines the two demos Maria suggested. I am attaching a sample project where the UserControl EditForm is populated with data and EntityDataSource is used.

In order to update the records you would need to handle the UpdateCommand event of RadGrid and update the records in the data source.

Regards,
Viktor Tachev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Julian
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Julian
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or