Telerik Forums
UI for WPF Forum
1 answer
110 views

Hi good morning, I need help with the design and how to implement a custom filter. If you can help me with a small example, I have been reading the "Custom Filtering Controls" documentation (https://docs.telerik.com/devtools/wpf/controls/radgridview/filtering/custom-filtering-controls) but I am having trouble implementing it for this case.

Currently I have a RadGridView, which shows a list of orders. One of the columns shows a list of icons:

public required List<IMvvmViewModel?> DesignStatusViewModels { get; set; }



Column:

<telerik:GridViewDataColumn IsReadOnly="True" HeaderCellStyle="{StaticResource DesignStatusCellStyle}">
    <telerik:GridViewDataColumn.Header>
        <TextBlock  
            Text="Design Status" 
            MinWidth="100"
            Width="Auto"
            TextAlignment="Center">
        </TextBlock>
    </telerik:GridViewDataColumn.Header>                    
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <ItemsControl ItemsSource="{Binding DesignStatusViewModels}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel 
                            Orientation="Horizontal"
                            HorizontalAlignment="Right"
                            TextElement.FontSize="12"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <ContentPresenter 
                            Grid.Row="0"
                            Content="{Binding }"
                            VerticalAlignment="Center"
                            ContentTemplateSelector="{StaticResource DesignStatusContentTemplateSelector}" 
                            Margin="2,0,2,0"/>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>




Each IMvvmViewModel has a bool, and a template, the template is responsible for showing the activated or not activated icon for each case, for example:

[DesignStatusTemplates(Template = typeof(DesignStatusRushOrderTemplate))]
publicpartialclassDesignStatusRushOrderViewModel : IMvvmViewModel
{
  publicbool IsRush { getset;}
}

[DesignStatusTemplates(Template = typeof(DesignStatusExternalOrderTemplate))]
publicpartialclassDesignStatusExternalOrderViewModel : IMvvmViewModel
{
publicbool IsExternal { get; set;}
}

What I need is to make a custom filter for this column, which can filter with a checkbox or whatever is easier, for example all orders that have DesignStatusRushOrderViewModel -> IsRush == true.

Thank you very much! Juan

  
Martin Ivanov
Telerik team
 updated answer on 12 Jul 2024
1 answer
61 views

Hi, i would like to remove the "orange rectangle" around the selected row, is it possibile?

i looked into the row structure, is it possible remove or collapse the "PART_RowBorder" ? 

Thanx

Stenly
Telerik team
 answered on 11 Jul 2024
0 answers
59 views
RadWindows appear transparent in Windows 11 Theme when running Windows 11 in Parallels Desktop with Coherence Mode activated.
Monja
Top achievements
Rank 1
 asked on 11 Jul 2024
1 answer
83 views

The RadNavigationView menu items don't seem to respect font size palatte settings. That is,

        FluentPalette.Palette.FontSize = FontSize;
        FluentPalette.Palette.FontSizeS = FontSizeSmall;
        FluentPalette.Palette.FontSizeL = FontSizeLarge;

will change the font sizes in grids, buttons, regular menus, etc., but not navigation menu items.  How can we get this working? XAML code:


    <Window.Resources>
        <telerik:StringToGlyphConverter x:Key="StringToGlyphConverter" />
            <Style TargetType="telerik:RadNavigationViewItem">
                <Setter Property="Content" Value="{Binding Title}" />
                <Setter Property="ItemsSource" Value="{Binding SubItems}"/>
                <Setter Property="Icon" Value="{Binding IconGlyph}" />
                <Setter Property="IconTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}" Font="fas" />
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
    </Window.Resources>

        <telerik:RadNavigationView Grid.Row="1"
            x:Name="NavigationView" ItemsSource="{Binding MenuItems}"
                                   AutoChangeDisplayMode="False"
                                   DisplayMode="Expanded"
                                   AllowMultipleExpandedItems="True"
                                   SubItemsIndentation="15"
                                   telerik:AnimationManager.IsAnimationEnabled="True"
                                   SelectionChanged="OnNavigationViewSelectionChanged">
            <telerik:RadNavigationView.Content>
                <Frame
                                Background="#00000000"
                                NavigationUIVisibility="Hidden"
                                Content="{Binding ContentPage}"/>
            </telerik:RadNavigationView.Content>
            <telerik:RadNavigationView.PaneFooter>
                <telerik:RadNavigationViewItem Content="Settings" 
                                               Command="{Binding NavigateItemSelectedCommand}"
                                               CommandParameter="Settings"
                                               IconTemplate="{x:Null}">
                    <telerik:RadNavigationViewItem.Icon>
                        <telerik:RadGlyph Glyph="&#xf013;" Font="fas" />
                    </telerik:RadNavigationViewItem.Icon>
                </telerik:RadNavigationViewItem>
            </telerik:RadNavigationView.PaneFooter>
        </telerik:RadNavigationView>

 

Masha
Telerik team
 answered on 11 Jul 2024
1 answer
63 views

Hi, i would like to change the default highlighted color (the line around the focused control now orange) for all components in the application?

thanx

 

 

 

Martin Ivanov
Telerik team
 answered on 09 Jul 2024
0 answers
51 views

Hello,

I tried to make a word document viewer with richtextboxes. The structure is displayed correctly, except for the parts where there are text boxes or comboboxes.
Attached is an example of the display difference.
Any help would be greatly appreciated.

I'm using Q1 2024 version of controls.

Sergio
Top achievements
Rank 1
 asked on 05 Jul 2024
1 answer
77 views

How do I declare these properties in a resource dictionary instead of code? I can't quite get the proper syntax.

FluentPalette.Palette.DisabledOpacity = 0.5; 
FluentPalette.Palette.ReadOnlyOpacity = 0.4; 
Martin Ivanov
Telerik team
 answered on 05 Jul 2024
2 answers
73 views

Say I have a RadGridView bound to this class:

    public class UserActivityNoteDTO
    {
        public Guid ActivityNoteId { get; set; }
        public string ActivityType { get; set; }
        public string ActivityStage { get; set; }
        public string EntityId { get; set; }
        public string MemberId { get; set; }

   }

When a cell is clicked I need to get the ActivityNoteId and what was clicked and the value.  So if I click a member id, I need to get the ActivityNoteId and MemberId and know MemberId was clicked (and not EntityId).

I've seen examples where you can get the rowitem or cell value but not both.

Neil N
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 04 Jul 2024
1 answer
55 views

Hi,

I have the attached hierarchical RadGridView.

In this I want to implement, that users can delete a single child and also that they can delete a parent.
Now in the way I thought it would work, if you press the Delte Key on the Keyboard, it triggers both events.

Is there a way to prevent this from happening?
And if not, how would I check if the event was triggered by a the child RadGridView or the parent?

 

Greetings,

Benedikt

        <telerik:RadGridView
            Grid.Row="1"
            x:Name="rgvAbschlagsRechnungenAlteSysteme"
            AutoGenerateColumns="False"
            GroupRenderMode="Flat"
            ShowGroupPanel="False"
            FilteringMode="Popup"
            ShowSearchPanel="False"
            CanUserSearch="False"
            ValidatesOnDataErrors="InEditMode"
            ItemsSource="{Binding Daten}"
            AlternationCount="2"
            ActionOnLostFocus="CommitEdit"
            CanUserDeleteRows="True"
            IsSynchronizedWithCurrentItem="True"
            ShowColumnFooters="True"
            SelectionMode="Extended"
            IsPropertyChangedAggregationEnabled="False"
            VirtualizingPanel.VirtualizationMode="Recycling"
            SelectedItem="{Binding selEintrag}"
            NewRowPosition="Top"
            AddingNewDataItem="rgvAbschlagsRechnungenAlteSysteme_AddingNewDataItem"
            RowEditEnded="rgvAbschlagsRechnungenAlteSysteme_RowEditEnded"
            Deleting="rgvAbschlagsRechnungenAlteSysteme_Deleting"
            >
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding RechnungsNr}"
                    Header="Rechnung Nr."
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="100"
                    >
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadMaskedTextInput
                                Value="{Binding RechnungsNr, Mode=TwoWay, UpdateSourceTrigger=Explicit}"    
                                maskedInput:MaskedInputExtensions.MaxTextLength="255"
                                Mask=""
                                MinWidth="100"
                                InputBehavior="Insert"
                                IsClearButtonVisible="False"
                                />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                    <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:CountFunction Caption="Anzahl:  " ResultFormatString="{}{0:N0}" />
                    </telerik:GridViewDataColumn.AggregateFunctions>
                </telerik:GridViewDataColumn>
                <telerik:GridViewComboBoxColumn
                    DataMemberBinding="{Binding RechnungsArt}"
                    Header="Rechnungs-Art"
                    HeaderTextWrapping="Wrap"
                    TextWrapping="Wrap"
                    ItemsSource="{Binding RechnungsArten}"
                    />
                <telerik:GridViewComboBoxColumn
                    DataMemberBinding="{Binding selVertriebsBereich}"
                    Header="Vertriebs-Bereich"
                    HeaderTextWrapping="Wrap"
                    TextWrapping="Wrap"
                    ItemsSourceBinding="{Binding VertriebsBereiche}"
                    DisplayMemberPath="Bezeichnung"
                    FilterMemberPath="selVertriebsBereich.Bezeichnung"
                    SortMemberPath="selVertriebsBereich.Bezeichnung"
                    />
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding DebitorenNummer}"
                    Header="Debitoren Nr."
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="100"
                    >
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadMaskedTextInput
                                Value="{Binding DebitorenNummer, Mode=TwoWay, UpdateSourceTrigger=Explicit}"    
                                maskedInput:MaskedInputExtensions.MaxTextLength="255"
                                Mask=""
                                MinWidth="100"
                                InputBehavior="Insert"
                                IsClearButtonVisible="False"
                                />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn
                    DataMemberBinding="{Binding FirstAuftrag.Objekt}"
                    Header="Objekt"
                    IsReadOnly="True"
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="200"
                    />
                <telerik:GridViewDataColumn 
                    DataMemberBinding="{Binding FirstAuftrag.BA}"
                    Header="BA-Nr."
                    IsReadOnly="True"
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    Width="155"
                    />
                <telerik:GridViewColumn 
                    UniqueName="AuftragHinzufügenButton"
                    Header="Auftrag hinzufügen"
                    IsReadOnly="True"
                    TextWrapping="Wrap"
                    HeaderTextWrapping="Wrap"
                    FilterMemberPath="BA"
                    Width="180"
                    >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadButton 
                                Content="Auftrag hinzufügen"
                                Command="{Binding AuftragHinzufügenCommand}" 
                                />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView 
                        AutoGenerateColumns="False"
                        GroupRenderMode="Flat"
                        ShowGroupPanel="False"
                        FilteringMode="Popup"
                        ShowSearchPanel="False"
                        CanUserSearch="False"
                        ValidatesOnDataErrors="InEditMode"
                        ItemsSource="{Binding Aufträge}"
                        AlternationCount="2"
                        ActionOnLostFocus="CommitEdit"
                        CanUserDeleteRows="True"
                        IsSynchronizedWithCurrentItem="True"
                        ShowColumnFooters="False"
                        SelectionMode="Extended"
                        IsPropertyChangedAggregationEnabled="False"
                        VirtualizingPanel.VirtualizationMode="Recycling"
                        Deleting="RadGridView_Deleting"
                        >
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn
                                DataMemberBinding="{Binding Objekt}"
                                Header="Objekt"
                                IsReadOnly="True"
                                TextWrapping="Wrap"
                                HeaderTextWrapping="Wrap"
                                Width="200"
                                />
                            <telerik:GridViewDataColumn 
                                DataMemberBinding="{Binding BA}"
                                Header="BA-Nr."
                                IsReadOnly="True"
                                TextWrapping="Wrap"
                                HeaderTextWrapping="Wrap"
                                Width="155"
                                />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
            <telerik:RadGridView.SortDescriptors>
                <telerik:ColumnSortDescriptor Column="{Binding Columns[\RechnungsNr], ElementName=rgvAbschlagsRechnungenAlteSysteme}" SortDirection="Ascending"/>
            </telerik:RadGridView.SortDescriptors>
        </telerik:RadGridView>


Martin Ivanov
Telerik team
 answered on 04 Jul 2024
0 answers
52 views
I'd like to know if I can make it so tables and images always fill width of RichTextBox.

I have a RichTextBox control that is not very wide and I want text to wrap and not give them a horizontal scrollbar. I can't set an explicit width as this needs to be dynamic. Is there anyway that I can make it so that tables/ pictures are inline and always occupy the entire width?
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 03 Jul 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?