Telerik Forums
UI for .NET MAUI Forum
1 answer
22 views

Hi there,

I am trying to style my dataGrid and I can't seem to use dynamic bindings for background colors etc. Whenever I do I get type mismatch compilation errors. 

If I switch to StaticResources it works just fine.

For app themes I obviously need these values to be dynamic. 

Any idea what I'm doing wrong here? Background styles and binding works correctly throughout the app so the binding is correct. It just doesn't want to compile for this control.

Thanks!

Angus

Didi
Telerik team
 answered on 29 Feb 2024
1 answer
16 views

 

Hi,

seems that the HorizontalTextAlignment="Center" isnt working for the DataGrid ColumnHeader, or at least I am unable to get it working.
For the cells it works.

NuGet Telerik.UI.for.Maui (6.7.0), latest VS2022 with latest Net8/Maui

I am new to Maui/Xaml.

Please help

Uli

Here is my MainPage.xaml and attached a screenshot of the running DataGrid:

 

<?xml version="1.0" encoding="utf-8" ?>

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
             x:Class="MaluTogo.MainPage">

    <ContentPage.Resources>
        <telerik:DataGridColumnHeaderStyle x:Key="ColumnHeaderStyle0" HorizontalTextAlignment="Center"/>
        <telerik:DataGridTextCellStyle x:Key="ColumnCellStyle0" HorizontalTextAlignment="Center"/>
    </ContentPage.Resources>    
    
    <ScrollView>
        <VerticalStackLayout
            Padding="30,0"
            Spacing="25">

            <telerik:RadDataGrid x:Name="_radDataGridMarkets" AutoGenerateColumns="False" UserEditMode="None" UserFilterMode="Disabled" UserGroupMode="Disabled" UserSortMode="None" >
                <telerik:RadDataGrid.Columns>

                    <telerik:DataGridTextColumn PropertyName ="Symbol" HeaderText="symbol" HeaderStyle="{StaticResource ColumnHeaderStyle0}" CellContentStyle="{StaticResource ColumnCellStyle0}" />
                    <telerik:DataGridTextColumn PropertyName ="LocalTimestamp" HeaderText="time" CellContentFormat="{}{0:HH:mm:ss}" HeaderStyle="{StaticResource ColumnHeaderStyle0}"  CellContentStyle="{StaticResource ColumnCellStyle0}" />
                    <telerik:DataGridTextColumn PropertyName ="Bid" HeaderText="bid" HeaderStyle="{StaticResource ColumnHeaderStyle0}" CellContentStyle="{StaticResource ColumnCellStyle0}" />
                    <telerik:DataGridTextColumn PropertyName ="Ask" HeaderText="ask" HeaderStyle="{StaticResource ColumnHeaderStyle0}" CellContentStyle="{StaticResource ColumnCellStyle0}" />
                    <telerik:DataGridTextColumn PropertyName ="Units" HeaderText="units" HeaderStyle="{StaticResource ColumnHeaderStyle0}"  CellContentStyle="{StaticResource ColumnCellStyle0}" />

                </telerik:RadDataGrid.Columns>
            </telerik:RadDataGrid>

        </VerticalStackLayout>
    </ScrollView>

</ContentPage>

 

Yana
Telerik team
 answered on 21 Feb 2024
1 answer
27 views

Using the DataTable and RadDataGrid example at https://docs.telerik.com/devtools/maui/controls/datagrid/datatable-support

How do I specify the binding for a CellContentTemplate  DataTemplate in XAML ?

For example, for IsVisited

<telerik:RadDataGrid.Columns>
    <telerik:DataGridBooleanColumn PropertyName="IsVisited" HeaderText="IsVisited" SizeMode="Auto"
                           CanUserEdit="False" CanUserFilter="false" IsResizable="false">
        <telerik:DataGridBooleanColumn.CellContentStyle>
            <telerik:DataGridTextCellStyle TextColor="Black" FontSize="14" SelectedTextColor="Blue" HorizontalTextAlignment="End" />
        </telerik:DataGridBooleanColumn.CellContentStyle>
        <telerik:DataGridColumn.CellContentTemplate>
            <DataTemplate>
                <telerik:RadCheckBox IsChecked="{Binding IsVisited}" IsEnabled="False" HorizontalOptions="Center"/>
            </DataTemplate>
        </telerik:DataGridColumn.CellContentTemplate>
    </telerik:DataGridBooleanColumn>
</telerik:RadDataGrid.Columns>

I'm getting the message

"Microsoft.Maui.Controls.Xaml.Diagnostics.BindingDiagnostics: Warning: 'IsVisited' property not found on 'System.Data.DataRowView', target property: 'Telerik.Maui.Controls.RadCheckBox.IsChecked'"

The checkbox is not checked when IsVisited is true.

Didi
Telerik team
 answered on 15 Feb 2024
1 answer
53 views

Edit: RadTabView also leaks. Attached new sample app.

We have found leaks in these controls. I have attached a sample app that demonstrates the problem.

I have logged a support ticket but is anyone else experience similar leaks with these controls?

From the included readme.md:-


Description

Memory leaks when using

  • Telerik RadDataGrid
  • Telerik RadCalendar
  • Telerik RadAutoComplete
  • Telerik RadTabView

Configuration

  • Dotnet 8
  • Telerik.UI.for.Maui 6.6 (also happens with 6.5)
  • Windows 10

Steps to reproduce

Build and run application

  1. Run publish.ps1 to build the application in release mode
  2. Run _temp/publish/Maui-Memleaks.exe

Leaks for every instance (RED buttons)

  1. Click a RED button.
  2. Close the "Close" button
  3. Click the "GC.Collect" button. Note that the "Alive" count will keep increasing every time you click a RED button (ie memory leak)

Leaks for last instance (ORANGE buttons)

  1. Click a ORANGE button.
  2. Close the "Close" button
  3. Click the "GC.Collect" button. Note that the "Alive" count will only increase the first time (ie memory leak), on subsequent clicks the "Release" count will increase.

No leaks (GREEN buttons)

  1. Click a GREEN button.
  2. Close the "Close" button
  3. Click the "GC.Collect" button. Note that the "Release" count will always increase (ie no leaks)
Yana
Telerik team
 answered on 23 Jan 2024
1 answer
34 views

Hi,

i have a scenario where I as loggedIn user belongs to some Organization and in UsersView I can see all users and also one of the columns is Organization. I would like to set filter of this column to same Organization as Im in. So I see only users from my organization by default.

 

so my question is how to set this filter from code or can i somehow bind it from xaml to some property ?

Didi
Telerik team
 answered on 19 Jan 2024
1 answer
64 views

Is there a way to allow copying from the RadDataGrid for the purpose of pasting into another application (Excel, text document, etc.?)

Would it be possible to copy an entire row or would it be restricted to the cell only?

Lance | Senior Manager Technical Support
Telerik team
 updated answer on 28 Nov 2023
2 answers
58 views
I need to implement an indent for the group headers based on level to better show the hierarchy. Is there anything built-in for this or a recommended method? The only thing I can see to do would be to create a converter to read the level of the GroupHeader and set the margin property of it based on that value.
Clint
Top achievements
Rank 1
Iron
Iron
 answered on 26 Nov 2023
1 answer
27 views

I want to use alternate row style, while also styling the other rows. But if I set RowBackgroundStyle, then the AlternateRowBackgroundStyle is ignored?

Here's the code for my grid:

And this is the result:

 

However, if I remove the RowBackgroundStyle, then it looks like this:

Because default background color is black, it now looks like this. Is it really not possible to style the two sets of rows?

René
Top achievements
Rank 1
Iron
 answered on 16 Nov 2023
2 answers
256 views
The documentation on your website https://docs.telerik.com/devtools/maui/controls/datagrid/columns/column-types/picker-column#important-properties is not complete and does not work.  Your downloaded samples does not include a sample of cell edit that includes a picker.  There are no working examples on the internet, your website, etc...  I'm trying to use a .net maui datagrid and get the picker to display data when editing the cell.  The picker displays, but the picker is empty.  The "country" example you provide isn't complete.
Lance | Senior Manager Technical Support
Telerik team
 answered on 29 Oct 2023
1 answer
53 views

Hi,

I tested nested properties in data grid by following this doc https://docs.telerik.com/devtools/maui/controls/datagrid/columns/nested-properties. But got an error at the footer of City Column when I counting the cities by PropertyAggregateDescriptor for this column


 

So I am wondering is aggregate supported for nested properties?

Jamison

Didi
Telerik team
 updated answer on 17 Oct 2023
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?