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

Grid and Edit Form with 2 different datasources

5 Answers 119 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 20 Oct 2009, 11:38 AM
Hello there,
In RAD GRID, 
as i have grid display the Summary ( 5 Fields )  and i want to edit the all details ( + 20 Fields )  
can i have different Data Source for Edit Form different then that for grid? 

also for the ADO.Net Data Services , what is the best practice for binding it with Rad Controls, currently i was trying using ObjectContainerDataSource and it seems working good but do you have better recommendations / concerns ? 
thanks
Sam

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Oct 2009, 12:49 PM
Hi Sam,

You could use a FormTemplate EditForm wherein you could place as many controls corresponding to the datatable fields. Check out the following online demo which illustrates on how to use a FormTemplate.
Form Template Edit Form

Thanks
Princy.
0
Sam
Top achievements
Rank 1
answered on 20 Oct 2009, 01:09 PM
Hi Princy,
but i want 2 different DataSources
as i don't want to Load all fields (+20fields ) while datagrid will use 5 fields only 
so i want to load Grid from SummaryDataSource and load Edit Form Template from DetailsDataSource
  
0
Accepted
Princy
Top achievements
Rank 2
answered on 21 Oct 2009, 06:57 AM
Hi Sam,

A suggestion would be to use the NestedViewTemplate in the grid wherein you can set different datasources for the mastertableview and nestedview. Thereby, you add controls to the NestedViewTemplate and update the database with the changes made. You can refer to the following help document to understand how to bind controls in a nested view template to a specified data source.
NestedViewTemplate Relations

Thanks
Princy.

0
Sam
Top achievements
Rank 1
answered on 21 Oct 2009, 09:47 AM
Hi Princy,
it seems exactly what i need i will try it today.

Do you have recommendations for what DataSource should i use with ADO.Net Data Services ( i'm using it to wrap my Entity Model)? 
Thanks,
Sam 
0
Ramjet
Top achievements
Rank 1
answered on 30 Apr 2010, 10:18 PM
OK,

I am missing the boat on this one. I have my data access via Entity Framework and bind an entity data object to the datagrid no problem. I want my second datasource to bind to the NestedView BUT the only option I have is DataSourceID which is expecting a string value that represents, for example, a SQLDataSource object.....but I don't need one I already have my data so how do I get the entity data bound to the nested view...yes I could circumvent the entity and make it work but that would defeat using the entity???

What am I missing?

TIA
JB
Tags
Grid
Asked by
Sam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Sam
Top achievements
Rank 1
Ramjet
Top achievements
Rank 1
Share this question
or