Skip to content

Commit 9b44168

Browse files
author
Joseph Herson Thomas
committed
GH-3546:Address the review changes
1 parent a99866c commit 9b44168

File tree

5 files changed

+24
-13
lines changed

5 files changed

+24
-13
lines changed

Grid-AdaptiveLayout/Grid-AdaptiveLayout/Grid-AdaptiveLayout.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="Syncfusion.Blazor.Grid" Version="20.4.0.49" />
12+
<PackageReference Include="Syncfusion.Blazor.Themes" Version="20.4.0.49" />
1213
</ItemGroup>
1314

1415
</Project>

Grid-AdaptiveLayout/Grid-AdaptiveLayout/Pages/Counter.razor renamed to Grid-AdaptiveLayout/Grid-AdaptiveLayout/Pages/AdaptiveUIWithMediaQuery.razor

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
@page "/counter"
1+
@page "/adaptiveuiWithMediaQuery"
22

33
@using Syncfusion.Blazor
44
@using Syncfusion.Blazor.Grids
55

6+
<p>DataGrid Adaptive UI layout using Media Query Component</p>
7+
68
<div style="position:relative; min-height: 500px;">
79
<SfMediaQuery @bind-ActiveBreakPoint="activeBreakpoint"/>
810
@if (activeBreakpoint == "Small")
@@ -20,10 +22,10 @@
2022
<GridFilterSettings Type="@FilterType.Excel"/>
2123
<GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true" Mode="EditMode.Dialog"/>
2224
<GridColumns>
23-
<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" IsPrimaryKey="true" Width="80" ValidationRules="@(new ValidationRules{ Required= true })"></GridColumn>
24-
<GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="120"></GridColumn>
25-
<GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="d" Type="ColumnType.Date" Width="130"></GridColumn>
26-
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" Width="120"></GridColumn>
25+
<GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" IsPrimaryKey="true" Width="80" ValidationRules="@(new ValidationRules{ Required= true })"/>
26+
<GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="120"/>
27+
<GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="d" Type="ColumnType.Date" Width="130"/>
28+
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" Width="120"/>
2729
</GridColumns>
2830
</SfGrid>
2931
</div>

Grid-AdaptiveLayout/Grid-AdaptiveLayout/Pages/Index.razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
@using Syncfusion.Blazor.Grids
44

5+
<p>DataGrid Adaptive UI layout using AdaptiveUIMode property</p>
6+
57
<div style="position:relative; min-height: 500px;">
68
<SfGrid DataSource="@Orders" AllowSorting="true" AllowFiltering="true" EnableAdaptiveUI="true"
79
AdaptiveUIMode="AdaptiveMode.Mobile" Height="100%" Width="100%" AllowPaging="true"
@@ -18,7 +20,7 @@
1820
</div>
1921

2022
@code{
21-
public List<Order> Orders { get; set; }
23+
public List<Order>? Orders { get; set; }
2224

2325
protected override void OnInitialized()
2426
{
@@ -34,7 +36,7 @@
3436
public class Order
3537
{
3638
public int? OrderID { get; set; }
37-
public string CustomerID { get; set; }
39+
public string? CustomerID { get; set; }
3840
public DateTime? OrderDate { get; set; }
3941
public double? Freight { get; set; }
4042
}

Grid-AdaptiveLayout/Grid-AdaptiveLayout/Pages/_Layout.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
1212
<link href="css/site.css" rel="stylesheet" />
1313
<link href="Grid-AdaptiveLayout.styles.css" rel="stylesheet" />
14-
<link href="https://cdn.syncfusion.com/blazor/20.4.48/styles/fluent.css" rel="stylesheet" />
15-
<script src="https://cdn.syncfusion.com/blazor/20.4.48/syncfusion-blazor.min.js" type="text/javascript"></script>
14+
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
15+
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
1616
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
1717
</head>
1818
<body>

Grid-AdaptiveLayout/Grid-AdaptiveLayout/Shared/NavMenu.razor

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
<nav class="flex-column">
1212
<div class="nav-item px-3">
1313
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
14-
<span class="oi oi-home" aria-hidden="true"></span> Home
14+
<span aria-hidden="true"></span> DataGrid Adaptive UI layout
1515
</NavLink>
1616
</div>
1717
<div class="nav-item px-3">
18-
<NavLink class="nav-link" href="counter">
19-
<span class="oi oi-plus" aria-hidden="true"></span> AdaptiveUI with SfMediaQuery
18+
<NavLink class="nav-link" href="adaptiveuiWithMediaQuery">
19+
<span aria-hidden="true"></span> DataGrid Adaptive UI using Media Query Component
2020
</NavLink>
2121
</div>
2222
<div class="nav-item px-3">
2323
<NavLink class="nav-link" href="fetchdata">
24-
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
24+
<span aria-hidden="true"></span> Fetch data
2525
</NavLink>
2626
</div>
2727
</nav>
@@ -37,3 +37,9 @@
3737
collapseNavMenu = !collapseNavMenu;
3838
}
3939
}
40+
41+
<style>
42+
.nav-item.px-3 .nav-link {
43+
line-height: 1rem;
44+
}
45+
</style>

0 commit comments

Comments
 (0)