What is the Right approach for CRUD operation using grid.

2 posts, 0 answers
  1. JD.
    JD. avatar
    37 posts
    Member since:
    Aug 2012

    Posted 18 Jun 2012 Link to this post

    Hi,

    For example sake:  Lets take Orders table or Customers table or any table.

    What i believe is in most of the cases, the grid is not used to display data from Orders table directly.  Its always a view table eg. vOrders
    Where vOrders connects to various other tables and data is displayed in grid.   this means that any feature of automatic insert/update will not be of useful,  also a grid might just display few columns that are needed , but while editing or inserting it needs all columns that are present in Orders table and not of vOrders. which means during edit/insert  I need to query main orders table (single row by querying a particular OrderID)

    Is there a live example to demonstrate this.

    The only way I could see is using "Custom Control.ascx", but the related examples are a bit confusing , because it just passes current reocord to customcontrol as "dataitem"  and then after insert/update the main aspx page queries control for individual values and proceeds with action.   so there is very much tight dependency on aspx and ascx.   (makeing it difficult to reuse .ascx  elsewhere)

    I wish to learn what approach other developers have taken or recommend me.  It would be nice if telerik team gives some good suggestion/knowledge .


    Regards

  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 21 Jun 2012 Link to this post

    Hi,

    Automatic datasource operations as their name suggests are operations that are more dependent on the datasource than on the databound control that is used. The databound control is used only to provide that values for the fields that are presented in the datasource.

    Keeping this in mind, if the datasource is capable of inserting in multiple tables simultaneously then the databound control that is bound to this datasource would be capable too.

    You could check this help topic for more information on how you could encapsulate CRUD operations over VIews.

    Greetings,
    Andrey
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top