Update one column at a time in edit mode

2 posts, 0 answers
  1. Lee Malo
    Lee Malo avatar
    33 posts
    Member since:
    Apr 2008

    Posted 03 Mar Link to this post

    Can someone give me an example of editing one cell at a time in edit mode?

    For example If i have a Table    Color | Make | Model , and i edit it I get 

    Color ____________

    Make____________

    Model ____________

    Update Cancel

    this sends the parameters Color | Make | Model  to the stored procedure

    I want to do this

    Color ___________ Update

    Make ___________Update

    Model __________Update

    This will send the datakey, the field name Color and the value for color.

    Is this possible? and did I make sense?

  2. Attila Antal
    Admin
    Attila Antal avatar
    573 posts

    Posted 06 Mar Link to this post

    Hi Lee,

    The built-in editing functionality of the Grid is beyond the described behavior but can be easily implemented.

    Instead of using the Grid's built-in editing system, you can create your own. 

    For example, try using Templates Columns and in each cell, you can place a TextBox and a Button.

    Using the button, you can make the Grid fire specific commands see How to Fire Command Events. For instance, buttons in the Column1 cells could fire "UpdateColumn1Data" and so, you can access the cell, its value and only update that value in the database. Here is the article that will help you access the cells and values: Accessing Values and Controls

    You may also inspect the code in the following example to see how it was implemented and get some ideas, inspiration from it: Update all, individual or selected rows using RadGrid with InPlace edit mode

     

    Kind regards,
    Attila Antal
    Progress Telerik

    Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Back to Top