Bind to dynamic SQL?

2 posts, 0 answers
  1. Juan
    Juan avatar
    3 posts
    Member since:
    Jun 2012

    Posted 14 Jul 2015 Link to this post

    Is there a way to bind the Grid to the results from a 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.

  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 17 Jul 2015 Link to this post

    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.

    Georgi Krustev
    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
Back to Top