Telerik Forums
UI for WPF Forum
0 answers
34 views

Hello, 

I am using a RadTreeView component in a WPF application that looks like in the following photo. The hierarchy is: a Category can contain a list of SubCategories and a SubCategory contains a List of Activities that have some properties. I would like to transform my RadTreeView into a RadTreeListView or RadGridVew in order to beneficiate from SelectionUnit property and the navigation between cells from the keyboard but I could not find anything that meets by needs:

a component with cells only on the last level of the hierarchy, to be able to select a cell and edit it  and, if possible, to have a tabular header with details from the last level of the hirarchy.

 

Thank you!

Andreea
Top achievements
Rank 1
Iron
 updated question on 08 Feb 2024
0 answers
29 views

Hi,

I am working with RadGridView of Telerik

Source of the RadGridView is QueryableCollectionView (with OData)

Each column has filter option.

but the filter popup advance contains only "Select All" and not all the values of the column.

What should I do for see all the values in the filter advance?

Thanks

Adiel
Top achievements
Rank 1
 asked on 06 Feb 2024
1 answer
28 views

Hi, we have implemented the ExportToXlsx method and it worked really well out the box.. however we are utilising the paging method (also the group before paging too) and would like the export to give us all the data returned - this is present in the dataset, so no additional call is needed to get more pages.

Any assistance would be great.

 

Matthew

Martin Ivanov
Telerik team
 answered on 01 Feb 2024
1 answer
29 views

Hi,

I have this code and i do not know how to bind to a view model command when i check a checkbox or when i write in a column.

<UserControl x:Class="WISN.Windows.Survey.FacilityStaffControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:vm="clr-namespace:WISN.Windows.Survey.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <telerik:RadTreeListView x:Name="stufftreeListView" AutoGenerateColumns="False"
                                 AutoExpandItems="True" GroupRenderMode="Flat" CanUserDeleteRows="False"
                                 ItemsSource="{Binding AllStaffByType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged }">
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding StaffCategories,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></telerik:TreeListViewTableDefinition>
            </telerik:RadTreeListView.ChildTableDefinitions>

            <telerik:RadTreeListView.Columns>
                <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected}" AutoSelectOnEdit="True" EditTriggers="CellClick">
                    <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding CustomCommandCommand}" EventName="MouseLeftButtonDown" />
                    </telerik:EventToCommandBehavior.EventBindings>
                </telerik:GridViewCheckBoxColumn>
                <telerik:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding Name}" Header="Stuff"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding AnnualSalary}" Header="Annual Salary"></telerik:GridViewDataColumn>
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>
</UserControl>

Thanks

 

Dimitar
Telerik team
 answered on 17 Jan 2024
0 answers
26 views

Hi,

I am using <telerik:RadTreeListView> and the scroll functionality does not work. this is how my code looks like:

<UserControl x:Class="WISN.Windows.Survey.FacilityStaffControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:vm="clr-namespace:WISN.Windows.Survey.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <telerik:RadTreeListView x:Name="stufftreeListView" AutoGenerateColumns="False"
                                 AutoExpandItems="True" GroupRenderMode="Flat" CanUserDeleteRows="False"
                                 ItemsSource="{Binding AllStaffByType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged }">
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding StaffCategories,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></telerik:TreeListViewTableDefinition>
            </telerik:RadTreeListView.ChildTableDefinitions>

            <telerik:RadTreeListView.Columns>
                <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected}" AutoSelectOnEdit="True" EditTriggers="CellClick">
                    <telerik:EventToCommandBehavior.EventBindings>
                        <telerik:EventBinding Command="{Binding CustomCommandCommand}" EventName="MouseLeftButtonDown" />
                    </telerik:EventToCommandBehavior.EventBindings>
                </telerik:GridViewCheckBoxColumn>
                <telerik:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding Name}" Header="Stuff"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding AnnualSalary}" Header="Annual Salary"></telerik:GridViewDataColumn>
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>
</UserControl>

 

I really do not know how to fix it.

Thanks

Andreea
Top achievements
Rank 1
Iron
 asked on 16 Jan 2024
0 answers
25 views

In my `telerik:RadGridView`, I have configured a `CellValidating="RadGridView_CellValidating"` callback.  It successfully catches a validation error, which then invokes this code:

e.IsValid = false;
e.ErrorMessage = "Enter a valid URL with 'https://' or 'http://'";

The cell does properly receive a red border, and what looks like a tool-tip notation in the top right corner.  However, unfortunately, I am unable to see the tool-tip, regardless if I hover or click on the tool-tip.  What are perhaps the top three to five reasons this might be happening?

It is specifically the "Documentation" column above, which is a `GridViewHyperlinkColumn`, which is failing validation...with no tool-tip showing.  To be clear, actually none of the columns have a working or "showable" tool-tip.  Even so, here is the code specifically for my "Documentation" column:

    <telerik:GridViewHyperlinkColumn
        IsReadOnly="{Binding IsEditModeWithPermissions, Converter={StaticResource InverseBooleanConverter}}"
        CellStyle="{StaticResource GridViewCellStyleStretch}" IsCustomSortingEnabled="False"
        ValidatesOnDataErrors="InViewMode"
        UniqueName="Documentation"
        MinWidth="80" MaxWidth="350" Width="150"
        DataMemberBinding="{Binding Documentation}"
        Name="DocumentationColumn" Header="Documentation">
        <telerik:GridViewHyperlinkColumn.CellTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding DocumentationFormatted, StringFormat='{}{0}'}"/>
            </DataTemplate>
        </telerik:GridViewHyperlinkColumn.CellTemplate>
        <telerik:GridViewHyperlinkColumn.CellEditTemplate>
            <DataTemplate>
                <telerik:RadComboBox x:Name="DocumentationBox"
                    Text="{Binding Documentation, Mode=TwoWay}" KeyDown="RadComboBox_PreviewKeyDown"
                    IsTextSearchEnabled="True" TextSearchMode="StartsWith" OpenDropDownOnFocus="True"
                    StaysOpenOnEdit="False" Loaded="RadComboBox_Loaded" IsEditable="True" >
                    <telerik:RadComboBox.Resources>
                        <Style TargetType="TextBox">
                            <Setter Property="MaxLength" Value="{Binding DocumentationColumnWidth}" />
                        </Style>
                    </telerik:RadComboBox.Resources>
                </telerik:RadComboBox>
            </DataTemplate>
        </telerik:GridViewHyperlinkColumn.CellEditTemplate>
    </telerik:GridViewHyperlinkColumn>

And here is the RadGridView initial declaration:

    <telerik:RadGridView Grid.Row="1"
        CellValidating="RadGridView_CellValidating"
        BorderThickness="{Binding GridBorderThickness}"
        SelectedItem="{Binding SelectedLineItem, Mode=TwoWay}" Pasting="UxGrid_OnPasting"
        SelectionChanged="UxGrid_OnSelectionChanged" CopyingCellClipboardContent="UxGrid_OnCopyingCellClipboardContent"
        RowIndicatorVisibility="Visible"
        ValidatesOnDataErrors="InViewMode"
        EditTriggers="CellClick"
        ActionOnLostFocus="CommitEdit" Name="uxGrid"
        PreparingCellForEdit="uxGrid_PreparingCellForEdit" Deleted="UxGrid_OnDeleted"
        CellEditEnded="uxGrid_CellEditEnded"
        KeyDown="GridKeyDown"
        ScrollMode="Deferred"
        IsReadOnly="{Binding IsGridEditable, Converter={StaticResource InverseBooleanConverter}}"
        CanUserDeleteRows="{Binding CanEditNotReleased}" CanUserInsertRows="False"
        AreRowDetailsFrozen="True" EnableColumnVirtualization="False"
        RowDetailsVisibilityMode="{Binding RowDetailsVisibility}"
        DataLoaded="UxGrid_OnDataLoaded"
        RowEditEnded="RadGridViewRowEditEnded" BeginningEdit="RadGridViewBeginningEdit"
        AlternationCount="2" AutoGenerateColumns="False" 
        ItemsSource="{Binding LineItemsView, UpdateSourceTrigger=PropertyChanged}" SourceUpdated="uxGrid_SourceUpdated_1"
        Loaded="uxGrid_Loaded"
        LoadingRowDetails="UxGrid_OnLoadingRowDetails"
        ColumnWidthChanged="GridViewDataControl_OnColumnWidthChanged"
        DataContext="{Binding}"
        ColumnReordering="uxGrid_ColumnReordering"
        CanUserSortColumns="{Binding IsEditMode, Converter={StaticResource InverseBooleanConverter}}"
        IsFilteringAllowed="{Binding IsEditMode, Converter={StaticResource InverseBooleanConverter}}">
Scott
Top achievements
Rank 1
Iron
 updated question on 11 Jan 2024
2 answers
24 views

Use Case

our users have the possibility to save and load their own RadGridView filter settings.

One user want to get all entries where the value of the property \ column "CreateionDateUtc" is older than 90 days.

 

Problem

Currently you can only configure Is Less Than "Fixed Date". That means you have to change the "Fixed Date" every day to get the required result.

Is there a possibility to add a filter to the DateTime Column for example Less than 90 Days?

 

Thanks

Tobias
Top achievements
Rank 1
Iron
 answered on 09 Jan 2024
2 answers
20 views

Hi

In RadGridView, I want to change the language of "click here to add new item" to Chinese(check the attachment please), any idea? thanks

-Jeffrey

Jeffrey
Top achievements
Rank 1
Iron
 answered on 05 Jan 2024
0 answers
22 views

Hi all,
If I try to search over as a string field, I have an issue because it's handled like an integer and ends in StackOverFlowException.
Do you have any idea?
I appreciate any help you can provide.


Dev2WPF
Top achievements
Rank 1
 asked on 20 Dec 2023
0 answers
30 views

Hi,

Testing a gridview custom control with .NET 6 does not render on screen.

The same example with .net framework works.


 public class CustomGrid : RadGridView
 {
     static CustomGrid()
     {
         DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomGrid), new FrameworkPropertyMetadata(typeof(CustomGrid)));
     }

     protected override void OnInitialized(EventArgs e)
     {
         base.OnInitialized(e);
                 
     }
 }


 <Grid>
     <my:CustomGrid Grid.Row="0"
                   x:Name="clubsGrid" 
                   AutoGenerateColumns="False"
                   GroupRenderMode="Flat"
                   Margin="5">
         <my:CustomGrid.Columns>
             <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
             <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}" Header="Est." DataFormatString="{}{0:yyyy}"/>
             <telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}" Header="Stadium" DataFormatString="{}{0:N0}"/>
         </my:CustomGrid.Columns>
     </my:CustomGrid>
 </Grid>

Thanks.
Evangelista
Top achievements
Rank 1
Iron
 asked on 20 Dec 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?