Skip to content

Commit 03606a8

Browse files
Merge pull request #2 from SyncfusionExamples/MAUI-4867
How to create DataGridTemplateColumn from code-behind in MAUI DataGrid (SfDataGrid)?
2 parents b9399f5 + ebaa125 commit 03606a8

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

DataGridMAUI/DataGridMAUI.csproj

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
5-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
6-
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7-
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
4+
<!-- Targeting .NET 9 multi-platform -->
5+
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
6+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
7+
8+
<!-- Optional: Add tizen if needed -->
9+
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->
10+
811
<OutputType>Exe</OutputType>
912
<RootNamespace>DataGridMAUI</RootNamespace>
1013
<UseMaui>true</UseMaui>
1114
<SingleProject>true</SingleProject>
1215
<ImplicitUsings>enable</ImplicitUsings>
1316

14-
<!-- Display name -->
17+
<!-- App metadata -->
1518
<ApplicationTitle>DataGridMAUI</ApplicationTitle>
16-
17-
<!-- App Identifier -->
1819
<ApplicationId>com.companyname.datagridmaui</ApplicationId>
1920
<ApplicationIdGuid>3cc82585-b31c-45a6-a753-aa17619d153d</ApplicationIdGuid>
20-
21-
<!-- Versions -->
2221
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
2322
<ApplicationVersion>1</ApplicationVersion>
2423

24+
<!-- Supported platform versions -->
2525
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
2626
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
2727
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
@@ -41,15 +41,16 @@
4141
<MauiImage Include="Resources\Images\*" />
4242
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
4343

44-
<!-- Custom Fonts -->
44+
<!-- Fonts -->
4545
<MauiFont Include="Resources\Fonts\*" />
4646

47-
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
47+
<!-- Raw Assets -->
4848
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
4949
</ItemGroup>
5050

5151
<ItemGroup>
52-
<PackageReference Include="Syncfusion.Maui.DataGrid" Version="20.4.51" />
52+
<PackageReference Include="Syncfusion.Maui.DataGrid" Version="*" />
5353
</ItemGroup>
5454

55+
5556
</Project>

DataGridMAUI/DataGridMAUI.csproj.user

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
5-
<ActiveDebugFramework>net6.0-windows10.0.19041.0</ActiveDebugFramework>
5+
<ActiveDebugFramework>net9.0-windows10.0.19041.0</ActiveDebugFramework>
66
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
7+
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
8+
<DefaultDevice>pixel_7_-_api_35</DefaultDevice>
9+
</PropertyGroup>
10+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-android|AnyCPU'">
11+
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
712
</PropertyGroup>
813
</Project>

0 commit comments

Comments
 (0)