Search code examples
c#.netxamlxamarinmaui

How to Create DataGrid with .NET MAUI Preview 7?


I'm working with a .NET MAUI Preview 7 project and I need to create a Table/Datagrid but I see that in the XAML file, there is no tag for "Table","DataGrid" or "DataView".

I found only "Grid" which is used to divide the form in rows and columns.

What should I use to create a table showing data (DataBinding)?

Thanks


Solution

  • Assuming that you mean a grid control like Excel, then that is not something you will find in the box for .NET MAUI, not for the preview, but also not for the final version.

    Depending on what you want to achieve you might want to reconsider how you are representing your data or consider getting pre-made controls from vendors like Telerik or SyncFusion.

    Update: Reading this again I might've misunderstood your question, sorry about that. A control like that won't be available with .NET MAUI, but of course you can create a custom control if that's what you like. The Grid probably is a great starting point, but that will only provide the layout with read-only data. If you want to extend it beyond that you will have to gain knowledge about how to create custom controls for .NET MAUI