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

Grid Refresh Column

1 Answer 156 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 25 Mar 2019, 05:40 PM

I'm using the asp.net MVC Grid with inline edit. I have a foreign key column with a editor template. When adding a new record (via a modal - partial view).

I have a situation where I can add numerous records using the modal. Each record can reference another already created record from the same table. 

The grid refreshes with each newly created record however the field that references a previous record shows blank when the record being referenced is a newly created record. The field in the grid is populated via the model.

I think the issue i'm having is that the model is not being updated when creating new records, so those new records that reference newly created records themselves show a blank in the field. If i refresh the page then the field shows the values OK. 

My Editor template is using a Kendo Drop Down List using Datasource to reference a Read Action and this is populated as expected when going into edit mode. If I select a newly created record with a blank field the drop down will have the correct value pre-selected but this is not shown on the grid.

I have seen forum answers where the controller method used in my Editor Template returns the collection for the drop down list and the view with its collection updated however making this change stops the drop down working. 

So the question is whether there is a simple way of updating the grid collection so that i dont get blank records when adding new data

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 27 Mar 2019, 12:08 PM
Hello Jon,

Could you please share the Grid and the DropDownList configuration, along with the the model bound to the Grid and the editor, so we could have a better understanding of the exact scenario and the current implementation?

Looking forward to your reply.


Regards,
Konstantin Dikov
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
Jon
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or