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

Grid and batch update in MVC

1 Answer 652 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ujjwalkanti
Top achievements
Rank 1
Ujjwalkanti asked on 10 Mar 2017, 06:09 AM

Hi,

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.

Regards,

Ujjwal

 

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 13 Mar 2017, 02:55 PM
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);


Regards,
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.
Tags
Grid
Asked by
Ujjwalkanti
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or