This is a migrated thread and some comments may be shown as answers.
refresh detailTemplate
1 Answer 7 Views
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 15 Sep 2017, 02:38 PM

Hello,

I have a KendoGrid with a detaiTemplate:

detailTemplate: kendo.template($("#template").html()),

 

And the Temmplate:

<script type="text/x-kendo-template" id="template">
        <br>
        <div class="tabstrip">
            <ul>
                <li class="k-state-active">
                    Verteiler
                </li>
                <li>
                    Verteiler hinzufügen
                </li>
                <li>
                    Dokumente
                </li>
            </ul>

            <div>
                <h4>Verteiler</h4>
            </div>

            <div>
                <h4>Verteiler hinzufügen</h4>
            </div>

            <div>
                <!-- Upload -->

                <!-- Div mit der ID des Projektes, damit die Datei zugeordnet werden kann -->
                <div style="display:none;" id="id">#=id#</div>

                Neu hochladen: <input name="files" id="files" type="file" />
                <hr> Vorhandene Elemente:

                <div id="alreadyDocs"><b>noch keine Elemente vorhanden</b>
                </div>

            </div>

        </div>
        <br>
    </script>

 

 

with the following Javascript:

function detailInit(e) {
            var detailRow = e.detailRow;

            detailRow.find(".tabstrip").kendoTabStrip({
                animation: {
                    open: {
                        effects: "fadeIn"
                    }
                }
            });

            //Die Id des Projektes ist in dem Template in dem div mit der id "id" gespeichert
            var id = detailRow.find("#id").html();

            /* Uploader Widget erstellen*/
            detailRow.find("#files").kendoUpload({
                async: {
                    saveUrl: "save.php?parentID=" + id,
                    autoUpload: true
                },
                success: onSuccess
            });
        }

 

In the Subgrid Tab "Dokumente" will be all Documents, which were already uploaded to the master-Line.

And I want, that after uploading (onSuccess), the Subgrid refreshes.

 

How to do that?

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 19 Sep 2017, 07:40 AM
Hello Patrick,

In this scenario, I can suggest using the activateTab method of the TabStrip to programmatically activate the "Dokumente" tab when the upload is successful:

http://docs.telerik.com/kendo-ui/api/javascript/ui/tabstrip#methods-activateTab

If this approach is not applicable, please provide more details and a runnable example and I will gladly assist further. 

Regards,
Stefan
Progress Telerik
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
Patrick
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or