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

Set Default Insert Values in Batch Mode

1 Answer 260 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Puja
Top achievements
Rank 1
Puja asked on 30 Aug 2018, 09:01 AM

Hi

I had a RadGrid with EditMode as InPlace which was working properly.Now I am trying to change it to Batch Mode.
The issue is with the click of Add New Button  I need to set the default values which are populated from database .
Previously when the Grid was in InPlace mode the ItemCommand used to do that work with the command name InitInsertCommand but with Batch EditMode this don't seem to work.
Please tell me how to achieve this

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 01 Sep 2018, 06:11 PM
Hi Puja,

It is important to note that the batch editing happens entirely on the client, so a value in the editor cannot be set from the server and a call to the database cannot be made. The purpose of the batch editing is to:

  • make editing for the user quick by moving the same set of editor controls in each row/cell they are needed
  • sending updates/inserts/deletions at one go to the server

With this in mind, pre-selecting values for the users is something that should usually be handled through useful validation messages: https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/batch-editing/validation.

That said, the following code library example shows one way to do this, yet it is not something we support: https://www.telerik.com/support/code-library/pre-populate-insert-item-with-batch-edit.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Puja
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or