This is a migrated thread and some comments may be shown as answers.

apply theme for asp.net mvc grid

7 Answers 923 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ziming
Top achievements
Rank 1
Ziming asked on 25 Mar 2015, 06:02 AM
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

7 Answers, 1 is accepted

Sort by
0
Accepted
vitaliy
Top achievements
Rank 1
answered on 25 Mar 2015, 06:12 AM
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)
0
Ziming
Top achievements
Rank 1
answered on 25 Mar 2015, 10:16 PM
Thank you vitaliy, that did the trick :)
0
Ziming
Top achievements
Rank 1
answered on 25 Mar 2015, 11:48 PM
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
0
vitaliy
Top achievements
Rank 1
answered on 26 Mar 2015, 12:58 AM
may be it:
link
0
Ziming
Top achievements
Rank 1
answered on 26 Mar 2015, 01:05 AM
thank you for your prompt reply :)
0
Alberto
Top achievements
Rank 1
answered on 03 May 2016, 07:52 PM
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
0
Dimo
Telerik team
answered on 05 May 2016, 12:22 PM
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
Tags
Grid
Asked by
Ziming
Top achievements
Rank 1
Answers by
vitaliy
Top achievements
Rank 1
Ziming
Top achievements
Rank 1
Alberto
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or