Tabstrip in Grid Editor Template (LoadContentFrom)

2 posts, 1 answers
  1. Robert Madrian
    Robert Madrian avatar
    163 posts
    Member since:
    Apr 2003

    Posted 05 Oct Link to this post

    Hello,

    I use a Tabstrip in a Grid Editor Template and want to load the the Content with LoadContentFrom and Parameters like:

    tab.Add().Text("Profile (0)").LoadContentFrom("GetPartialView_frmMitgliedaktprofileEdit", "Mitgliedakt", new { mitgliedid = Model.Mitglied_ID, aktid = Model.Akt_ID });

    The Problem to have aTabstrip in the grid template is that I cannot access the model values:
    new { mitgliedid = Model.Mitglied_ID, aktid = Model.Akt_ID }

    How can I load the Content of a tab with Parameters on the Client (reload?) or how to pass the two Parameters for loading if the tab is klicked
    (I think it must be on the Client with javascript)

    robert

     

     

  2. Answer
    Ianko
    Admin
    Ianko avatar
    1729 posts

    Posted 10 Oct Link to this post

    Hello Robert,

    As the template rendered is processed on the client when using AJAX binding with the grid, the model binding does not work. 

    You should rather use Kendo Template syntax and call the toClientTemplate method of the Kendo().TabStrip() in order to get that working. 

    @(Html.Kendo().TabStrip().Name("tabstrip")
        .Items(tab => {
            tab.Add().Text("Profile (0)")
            .LoadContentFrom("GetPartialView_frmMitgliedaktprofileEdit", "Mitgliedakt", new { mitgliedid = "#: Mitglied_ID #", aktid = "#: Akt_ID #" });
        })
        ).ToClientTemplate()
    )


    Regards,
    Ianko
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top