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

Refresh the data in the popupeditor other grid

3 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Veteran
Alexander asked on 15 Nov 2020, 02:19 PM

Hi all,

 

I have s pretty complex grid set up that uses a popupeditorto edit records. In this popupedsitor i included two child grids that are (through the ToClientTemplate method) perfectly working as should. I only have 1 remaining requirement. I need to refresh the record being shown in the popupeditor if i add records to one of the client grids.I have some flags in the main entity (the one in the form) that get filled when the child grids get populated.... So the question:

 

Can i refresh the record being shown in the popupeditorthroughfrom a javascript function (i will use the events in the childgrid to do this)?

 

I tried:

getting the grid datasource and doing the .sync() and the .read(). But they (of course) close the popupeditor... Anyone?

 

Tx

Alexander

 

 

3 Answers, 1 is accepted

Sort by
0
Alexander
Top achievements
Rank 1
Veteran
answered on 15 Nov 2020, 02:22 PM

PS,

 

The attributes in need of refreshing are these for boolean that show a (font-awesome) checkbox if true:

 

<div class="col-md-4">
                        Actions
                    </div>
                    <div class="col-md-8">
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-md-2">
                                    <i class="fa" data-bind="css: {fa-check-square: PlacardingIssues}"></i>
                                </div>
                                <div class="col-md-10">
                                    @Html.LabelFor(model => model.PlacardingIssues)
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-2">
                                    <i class="fa" data-bind="css: {fa-check-square: CargoIssues}"></i>
                                </div>
                                <div class="col-md-10">
                                    @Html.LabelFor(model => model.CargoIssues)
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-2">
                                    <i class="fa" data-bind="css: {fa-check-square: CargoSecuringIssues}"></i>
                                </div>
                                <div class="col-md-10">
                                    @Html.LabelFor(model => model.CargoSecuringIssues)
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-2">
                                    <i class="fa" data-bind="css: {fa-check-square: ImdgIssues}"></i>
                                </div>
                                <div class="col-md-10">
                                    @Html.LabelFor(model => model.ImdgIssues)
                                </div>
                            </div>
                        </div>
                    </div>
0
Alexander
Top achievements
Rank 1
Veteran
answered on 15 Nov 2020, 02:23 PM
PPS: This was part of the custom editortemplate
0
Tsvetomir
Telerik team
answered on 18 Nov 2020, 11:43 AM

Hi Alexander,

Thank you for the provided information on the scenario you are willing to achieve. When updating a row in the grid, it will get refreshed regardless of the method used - either sync or read. The only option that I can recommend is that after the update and refresh, programmatically open the same row for editing. This way, the grid is refreshed and the edit mode is entered. 

 https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/editrow

 

Kind regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Alexander
Top achievements
Rank 1
Veteran
Answers by
Alexander
Top achievements
Rank 1
Veteran
Tsvetomir
Telerik team
Share this question
or