From 1f3930728d36afce887356c1d1093ab8a1908e3e Mon Sep 17 00:00:00 2001 From: Tsvetomir Hristov <106250052+Tsvetomir-Hr@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:10:11 +0300 Subject: [PATCH 1/2] kb(Grid): kb update and code polish --- knowledge-base/grid-change-font-size.md | 32 ++++++++++++------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/knowledge-base/grid-change-font-size.md b/knowledge-base/grid-change-font-size.md index f620f7108..ba97252c3 100644 --- a/knowledge-base/grid-change-font-size.md +++ b/knowledge-base/grid-change-font-size.md @@ -6,7 +6,7 @@ page_title: Change Blazor Grid Font Size slug: grid-kb-change-font-size position: tags: telerik, blazor, grid, treelist, font, css, styles -ticketid: +ticketid: 1648462, 1646767, 1642310 res_type: kb --- @@ -23,11 +23,13 @@ res_type: kb ## Description -How to change the Grid font size? How to set custom font styles? +* How to change the Grid font size? +* How to set custom font styles? ## Solution -[Override the theme styles]({%slug themes-override%}) and set the desired font size to the Grid and its child components. +1. Set a custom CSS class to the Grid through the `Class` parameter. This configuration will allow you to target specific Grid instances. +2. Use the defined class to [Override the theme styles]({%slug themes-override%}) and set the desired font size to the Grid and its child components. >caption Change Blazor Grid Font Size @@ -39,20 +41,18 @@ How to change the Grid font size? How to set custom font styles? .k-grid.font-size .k-toolbar, /* grid cells */ .k-grid.font-size table, - /* textboxes */ .k-grid.font-size .k-input, /* date pickers */ .k-grid.font-size .k-picker, /* buttons */ .k-grid.font-size .k-button, - + .k-grid.font-size .k-button-text, /* column and filter menu */ .k-popup, .k-popup .k-input, .k-popup .k-picker, .k-popup .k-button, - /*column menu dropdowns */ .k-columnmenu-item { font-size: 12px; @@ -65,7 +65,6 @@ How to change the Grid font size? How to set custom font styles? Sortable="true" Groupable="true" ShowColumnMenu="true" - EditMode="GridEditMode.Inline" FilterMode="@GridFilterMode.FilterMenu"> Add @@ -76,25 +75,24 @@ How to change the Grid font size? How to set custom font styles? - Edit - Cancel + Command Button @code { - List GridData { get; set; } + private List GridData { get; set; } protected override void OnInitialized() { GridData = Enumerable.Range(1, 20).Select(x => new Product - { - Id = x, - Name = "Product name " + x, - Price = (decimal)(x * 3.14), - Released = DateTime.Now.AddMonths(-x).Date, - Discontinued = x % 5 == 0 - }).ToList(); + { + Id = x, + Name = "Product name " + x, + Price = (decimal)(x * 3.14), + Released = DateTime.Now.AddMonths(-x).Date, + Discontinued = x % 5 == 0 + }).ToList(); base.OnInitialized(); } From a805230fb090d4fdd5c20180cd6713c834ce0373 Mon Sep 17 00:00:00 2001 From: Tsvetomir Hristov <106250052+Tsvetomir-Hr@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:52:30 +0300 Subject: [PATCH 2/2] kb(Grid): apply tense recommendation --- knowledge-base/grid-change-font-size.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge-base/grid-change-font-size.md b/knowledge-base/grid-change-font-size.md index ba97252c3..bfc5e3170 100644 --- a/knowledge-base/grid-change-font-size.md +++ b/knowledge-base/grid-change-font-size.md @@ -28,7 +28,7 @@ res_type: kb ## Solution -1. Set a custom CSS class to the Grid through the `Class` parameter. This configuration will allow you to target specific Grid instances. +1. Set a custom CSS class to the Grid through the `Class` parameter. This configuration allows you to target specific Grid instances. 2. Use the defined class to [Override the theme styles]({%slug themes-override%}) and set the desired font size to the Grid and its child components. >caption Change Blazor Grid Font Size