Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > TabStrip and Grid server Binding
Telerik MVC Extensions are no longer supported (see this page for reference). In case you have inquiries about Kendo UI Complete for ASP.NET MVC, post them in the pertinent Kendo UI forums.

Not answered TabStrip and Grid server Binding

Feed from this thread
  • jawed avatar

    Posted on Jan 24, 2012 (permalink)

    Please find attached test project . I am facing problem in telerik grid with in tabstrip.

    Its show grid very first time nicely but when try to sort,edit or any operation on grid the grid does not get css and its become main page.
    Please see the problem and send solutuon.
    Thanks

    Attached files

  • Petur Subev Petur Subev admin's avatar

    Posted on Jan 24, 2012 (permalink)

    Hello Jawed,

    To make things work you need to configure your Grid to use Ajax binding, since it is loaded from partial view (using the LoadContentFrom method).

    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

  • jawed avatar

    Posted on Jan 25, 2012 (permalink)

    When i try with ajax binding then after sorting or editing cancel or any operation on  grid  then data of the  enum field of grid have change .It shows numeric value.
    Please see the new test project with ajax binding.

    In the previous build 
    Any other way to call page without LoadContentFrom that show grid page with in tab there is no any error while any oparation on grid??

    Please help

    thanks

    Attached files

  • Petur Subev Petur Subev admin's avatar

    Posted on Jan 26, 2012 (permalink)

    Hello again Jawed,

    This is happening because you are using a display template on your initial load to display the name of the enum, but when the data comes via Ajax (e.g. after sorting) the data is serialized using the value of the enum. I suggest you to use a view model which does not depend on enums.

    As for your second question I do not understand what you mean, could you clarify? 


    All the best,
    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

  • jawed avatar

    Posted on Jan 27, 2012 (permalink)

    Please send a  test project of this solution that support enum data as well as culture.


    Thanks
    Jawed

  • jawed avatar

    Posted on Jan 27, 2012 (permalink)

    My second question was
    Do have any idea or solution with server binding becouse I want both soltion server binding and ajax binding .I have already uploaded  my first test project(with server binding) .Please also send solution with server binding.

  • Petur Subev Petur Subev admin's avatar

    Posted on Jan 27, 2012 (permalink)

    Hello Jawed,

    I have attached a sample project. Basically it is using View Model to properly display the enum property since it is using string instead. There are also few other changes made to your editor template and no display template is needed.
    As for the server binding scenario you need to declare your grid in the same View as the TabStrip using the Content method
    e.g.
    tabstrip.Add()
    .Text("General")
    .ImageUrl("../../Content/2011.2.712/Common/Icons/Suites/mvc.png")
    .Content(() => {
       Html.Telerik().Grid<ElectrumApplication.Models.MarketSecurity>().Name("sda")
           //...
           .Render();
    }
    );


    All the best,
    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

  • jawed avatar

    Posted on Jan 30, 2012 (permalink)

    Thanks Petur
    Solution is good but there is a problem in this solution is that enum editor templates.
    I had written the code for generic for all the enum for singe editor templates but in your solution it is not generic.
    See
    @model System.Object
    @(
        Html.Telerik().DropDownList()
            .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
            .BindTo(new SelectList(Html.EnumSelectList<Object>(Model.GetType()), "Value", "Text"))
    )
     This is generic code for all enum type data or you can say for single editor template for all combo.

    but in your solution..

    @model System.Object
    @(
        Html.Telerik().DropDownList()
            .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))
                .BindTo(new SelectList(Html.EnumSelectList<Object>(typeof(ElectrumApplication.Models.SecurityType)), "Value", "Text"))
    )

    this is not generic ,it support only for "Security type" enum data.

    So Please help me how can make it generic that support all enum.


    As for the Server binding it good for your hints but  in the my project need 
    grid within grid  like Master/Detail grid you can see example
    http://demos.telerik.com/aspnet-mvc/razor/grid/hierarchyserverside 

    so please help can I implement this type of grid within tabsrip.

    Thanks.



  • Georgi Tunev Georgi Tunev admin's avatar

    Posted on Jan 30, 2012 (permalink)

    Hello Jawed,

     Please note that providing custom solutions by request is a consulting service and this is out of the scope of our support services. For such type of services, I would recommend our partner Falafel Software. This page provides more information on the subject.

    Greetings,
    Georgi Tunev
    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

  • jawed avatar

    Posted on Jan 31, 2012 (permalink)

    Thanks Petur
    Do you have any idea to solve this problem using server binding ??

    Thanks
    Jawed

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > TabStrip and Grid server Binding