Remote view Razor syntax example

6 posts, 0 answers
  1. Brian
    Brian avatar
    16 posts
    Member since:
    Feb 2013

    Posted 10 Aug 2013 Link to this post

    Are there any remote view examples in razor syntax anywhere?  I have not been able to find any and need to get them working.
  2. Brian
    Brian avatar
    16 posts
    Member since:
    Feb 2013

    Posted 11 Aug 2013 Link to this post

    I think I got remote views working fine, just not inside of a drawer.  Is there anything special that needs to be configured on the drawer to have remote views?

    @(Html.Kendo().MobileDrawer()
            .Name("my-drawer")
            .HtmlAttributes(new { style = "width: 280px" })
    .Views("drawer-welcome", "/Home/sites", "drawer-volumes", "drawer-production")
    .Content(obj =>
                Html.Kendo().MobileListView().Type("group")
                    .Items(root =>
                    {
                        root.Add().Text("Main Menu").Items(items =>
                        {
                            items.AddLink().Icon("inbox").Url("sites", "Home").Text("Site Data");
                            items.AddLink().Icon("star").Url("volumes", "Home").Text("Volumes");
                            items.AddLink().Icon("compose").Url("production", "Home").Text("Production");
                            items.AddLink().Icon("sent").Url("inventory", "Home").Text("Inventory");
                            items.AddLink().Icon("trash").Url("reports", "Home").Text("Reports");

                        });
  3. Kendo UI is VS 2017 Ready
  4. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 12 Aug 2013 Link to this post

    Hello Brian,

    the drawer should work out of the box with remote views. After the remote view has been loaded, you can use the web inspector to verify that its id matches the one specified in the drawer. Of course, if the drawer should be displayed in all views, you can remove the view setting altogether.

    // use something like this in the inspector to display the remote view id
     
    $("#my-home-sites-remote-view-id").data("id");

    Regards,
    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Brian
    Brian avatar
    16 posts
    Member since:
    Feb 2013

    Posted 13 Aug 2013 Link to this post

    Is this correct syntax for a remote view?

    items.AddLink().Icon("star").Url("Contact", "Home", "#drawer-starred").Text("Starred Items");
  6. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 14 Aug 2013 Link to this post

    Hello Brian,

    Isn't this the same as discussed in ticket with ID: 725528? If so, I'll consider it as resolved, right?

    Regards,
    Nikolay Rusev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. Brian
    Brian avatar
    16 posts
    Member since:
    Feb 2013

    Posted 14 Aug 2013 Link to this post

    yes, consider it closed.  For anyone else having problems make sure the remote view does not include any application initialization tags or your app will not start properly.
Back to Top
Kendo UI is VS 2017 Ready