apply theme for asp.net mvc grid

8 posts, 1 answers
  1. Ziming
    Ziming avatar
    9 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2015 Link to this post

    Hi there,

    There seems no "Theme" property for me to change the style of the grid, I couldn't find in anywhere but in your demo there is a dropdown to choose to see different themes, am I missing anything?

    here is my code:

    @(Html.Kendo().Grid(Model.Customers)
            .Name("GridCustomers")

            .Columns(columns =>
            {
                columns.Bound(p => p.ID).Title("ID");
                columns.Bound(p => p.Name).Title("Name").Width(130);
                columns.Bound(p => p.Telephone).Title("Telephone").Width(130);
                columns.Bound(p => p.Extension).Title("Extension").Width(130);
                columns.Bound(p => p.Group).Title("Group");
            })
            .Pageable()
            .Sortable()
            .Scrollable(scr => scr.Height(430))
            .Filterable()
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(20)
                .ServerOperation(false)
             )
    )

    Thanks
    Ziming
  2. Answer
    vitaliy
    vitaliy avatar
    10 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2015 in reply to Ziming Link to this post

    docs
    read #3
    "~/Content/kendo/kendo.bootstrap.min.css" it is theme, replase it on other .css what you want ("styles" folder in the install directory)
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Ziming
    Ziming avatar
    9 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2015 in reply to vitaliy Link to this post

    Thank you vitaliy, that did the trick :)
  5. Ziming
    Ziming avatar
    9 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2015 in reply to vitaliy Link to this post

    Hi vitaliy,

    I have a related question, what happen if I have a tabstrip control which requires a different style than grid? How do we set the theme on the control level rather than bundle the css globally.

    Thanks in advance,
    Ziming
  6. vitaliy
    vitaliy avatar
    10 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2015 in reply to Ziming Link to this post

    may be it:
    link
  7. Ziming
    Ziming avatar
    9 posts
    Member since:
    Mar 2015

    Posted 25 Mar 2015 in reply to vitaliy Link to this post

    thank you for your prompt reply :)
  8. Alberto
    Alberto avatar
    1 posts
    Member since:
    Aug 2013

    Posted 03 May in reply to vitaliy Link to this post

    Excuse me. I do not understand how I can set a different them to a Kendo grid widget. I searched the point #3 to read but I didn't understand what you mean
  9. Dimo
    Admin
    Dimo avatar
    8331 posts

    Posted 05 May Link to this post

    Hi Alberto,

    Applying a different theme to a specific Kendo UI widget on the page is possible, but not supported or documented. The following forum post provides guidelines on how to achieve it.

    http://www.telerik.com/forums/setting-a-theme-on-individual-controls#3n0W5ltgZU2yIdigOduqCg

    Point 3 is not applicable to the Grid itself. However, it may be applicable to other Kendo UI widgets inside the Grid.

    Regards,
    Dimo
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready