Grid and batch update in MVC

2 posts, 0 answers
  1. Ujjwalkanti
    Ujjwalkanti avatar
    4 posts
    Member since:
    Jan 2017

    Posted 10 Mar 2017 Link to this post


    Here is our requirement,  we have to display 3 grid on 3 different button click. The data of the 3 grid will come from the same table (ex: tblCustomer). The grid also contains some dropdown field. The only different column will be displayed in each grid depending on button click.

    We also need to provide batch add/edit/delete, and we 'll allow add/edit/delete only if the user has the permission. 

    Could you please tell me what is the best way to implement this. We are using MVC4 project.

     Should we use shared data source or we should use 3 different data source for each grid? Is the batch edit supported by MVC4 grid? Please help.

    Any js fiddle link or guideline will be appreciated.





  2. Viktor Tachev
    Viktor Tachev avatar
    2469 posts

    Posted 13 Mar 2017 Link to this post

    Hi Ujjwal,

    The Batch editing feature is supported in the MVC Grid HtmlHelper. You can configure it as illustrated in the example below:

    As for your other query. Since the data in the difference Grids will be from the same table you can use a shared DataSource. You can define all fields in the DataSource and show only the relevant ones in the corresponding Grid component.

    If you would like to disable editing for specific field in the Grid you can set Editable(false) in the model.

    model.Field(p => p.ProductID).Editable(false);

    Viktor Tachev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top