Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > TabStrip > TabStrip in Grid PopUp Window and passing parameter from Model

Not answered TabStrip in Grid PopUp Window and passing parameter from Model

Feed from this thread
  • Eddie avatar

    Posted on Jul 8, 2011 (permalink)

    Hi All,
    I have a grid and onEdit action its opening the record in PopUp Mode. I'm using the EditorTemplate as well.
    I have the TabStrip in that template where I want to load the content from partial view.
    My Problem is I'm unable to access the properties of Model and hence cannot pass to my action.
    Here is the code of my EditorTemplate View.
    @model MyModel.BusinessObjects.Product

     @{ Html.Telerik().TabStrip()
            .Name("TabStrip")
            .Items(tabstrip =>
            {
                tabstrip.Add()
                    .Text("Details")
                    .LoadContentFrom("_GetProductCodes", "Products", new { productId = @Model.Id, productType  = 2});    // Here I cannot access the @Model.Id property
     })
            .SelectedIndex(0)
            .Render();
    }

    Any idea how can I access the Model Proeprties in PopUp Window ?

    Thanks in advance

    Reply

  • Posted on Jan 21, 2012 (permalink)

    Did you ever solve this or find a work-around?  I'm running into the same thing.

    Reply

  • Petur Subev Petur Subev admin's avatar

    Posted on Jan 23, 2012 (permalink)

    Hi Scott,

    Generally speaking you should not have any issues to access the Model properties as long as the model is declared and properly passed to the View. Could you please share a sample which reproduces the problem so we check what causes it?

    Kind regards,
    Petur Subev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now

    Reply

  • Eddie avatar

    Posted on Jan 25, 2012 (permalink)

    Hi Scott,
    I think this was a bug in Telerik or may be in MVC EditorTemplate control for using EditorTemplate along with the Telerik Grid that immediately onload or ondocumentReady functions/events you cannot get the handle of the Model properties. It takes a second or more to render and assign values to the properties.  I might be wrong but that never worked for us.
    What I have come around is that instead of using the EditorTemplate We used the Telerik Window control to have our own custom window and created a partial view (EditorTemplate) which gets loaded onload event of the window. And the model we passed to the partial view works absolutely fine there. Secondly we also get rid of the LoadContentFrom(..) and assign the contents dynamically by using our own custom ajax call.
    If you have any queries please do not hesitate to contact.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > TabStrip > TabStrip in Grid PopUp Window and passing parameter from Model
Related resources for "TabStrip in Grid PopUp Window and passing parameter from Model"

ASP.NET MVC TabStrip Features  |  Documentation  |  Demos  |  Telerik TV ]