Refresh the data in the popupeditor other grid

4 posts, 0 answers
  1. Alexander
    Alexander avatar
    6 posts
    Member since:
    May 2020

    Posted 15 Nov 2020 Link to this post

    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

     

     

  2. Alexander
    Alexander avatar
    6 posts
    Member since:
    May 2020

    Posted 15 Nov 2020 in reply to Alexander Link to this post

    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>
  3. Alexander
    Alexander avatar
    6 posts
    Member since:
    May 2020

    Posted 15 Nov 2020 in reply to Alexander Link to this post

    PPS: This was part of the custom editortemplate
  4. Tsvetomir
    Admin
    Tsvetomir avatar
    796 posts

    Posted 18 Nov 2020 Link to this post

    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/.

Back to Top