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

Bind to dynamic SQL?

1 Answer 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 14 Jul 2015, 05:41 PM

Is there a way to bind the Grid to the results from a ADO.net reader without converting each row into a POCO object? We are trying to figure a way of allowing the end-users to add data from sql joins to the grid's data. So for example:

 We have 3 tables: Parents, Students, Grades. A student can have multiple Parents (1..n) and multiple Grades (1..n). The default grid view should show only Students records but should allow the end user to add Parents to the grid so that each row shows parent/student combination.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 17 Jul 2015, 07:00 AM
Hello Juan,

If the Objects crated by ADO.NET are serializable (there should not be circular references), then there should be no problem to use them directly.

I would like, however, to emphasize that POCOs or DTOs in this case can save a valuable bandwidth  and in some cases can save you from the 'circular reference' issues.

The right answer in this case is "you will need to determine, which approach best fits your business requirements/needs". Both approaches are plausible.

Regards,
Georgi Krustev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Juan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or