Telerik Forums
UI for WPF Forum
1 answer
147 views

Hi,

I used ExplorerControl to create a custom FileOpen Dialog.

Now I want to include a file preview when clicking on a file of specific type.
Unfortunately I cannot find a way to get notified by a change of selected Filename.

Is there a way to do that?

 

Best Regards,

Dominic

 

Martin Ivanov
Telerik team
 answered on 22 Jan 2024
1 answer
145 views

I have the following XAML code:

<telerik:RadMultiColumnComboBox 
    VerticalAlignment="Top" 
    Width="250" 
    DisplayMemberPath="Name" 
    IsReadOnly="True" 
    SelectionMode="Single" 
    SelectionBoxesVisibility="Hidden" 
    CloseDropDownAfterSelectionInput="True"                   
    DropDownWidth="320"
    SelectedItem="{Binding SelectedMandant}">
    <telerik:RadMultiColumnComboBox.ItemsSourceProvider>
        <telerik:GridViewItemsSourceProvider ItemsSource="{Binding MandantCollection}" AutoGenerateColumns="False" RowIndicatorVisibility="Hidden"> 
            <telerik:GridViewItemsSourceProvider.Columns>
                <telerik:GridViewDataColumn Header="Mandant" DataMemberBinding="{Binding Path=Name}"/>
                <telerik:GridViewDataColumn 
                    Header="Letzter Abschluss" 
                    DataMemberBinding="{Binding Path=FibuAbschluss}" 
                    DataFormatString="{} {0:dd.MM.yyyy}" 
                    TextAlignment="Center" 
                    HeaderTextAlignment="Center"/>
            </telerik:GridViewItemsSourceProvider.Columns>
        </telerik:GridViewItemsSourceProvider>
    </telerik:RadMultiColumnComboBox.ItemsSourceProvider>
    <telerik:EventToCommandBehavior.EventBindings>
        <telerik:EventBinding EventName="SelectionChanged" Command="{Binding SelectedMandantChangedCmd}" RaiseOnHandledEvents="True" PassEventArgsToCommand="True"/>
    </telerik:EventToCommandBehavior.EventBindings>
</telerik:RadMultiColumnComboBox>

Now everything works fine beside that the first time when the UI is rendered, the RadMultiColumnComboBox Input does not show the current selected item.

I set the SelectedItem in the constructor of my view model:



private Mandant? _selectedMandant;
public Mandant? SelectedMandant
{
    get => _selectedMandant;
    set
    {
        _selectedMandant = value;
        OnPropertyChanged();
    }
}

public KontoViewModel(CommonDbContext commonDbContext, StruebyWinBContext winBContext) { ...... if(MandantCollection.Count > 0) { SelectedMandant = MandantCollection[0]; ...... } ....... }

I see that the SelectedMandat has a value and also it works fine after i select another item, then the item shows.

But the first time after loading, the RadMultiColumnComboBox Input does not show any value, its empty.

It should show the selected item that i set in the constructor of my view model.

Can anyone help me here, thanks

Osman
Top achievements
Rank 1
Iron
 updated answer on 18 Jan 2024
0 answers
82 views

RadCircularProgressBar cannot set width and heighth!

What ever height and width I set for the RadCircularProgressBar, the total pane never change its size.

Its so stange, I want a small RadCircularProgressBar, how can i do it? it just keeps its original size.

<telerik:RadCircularProgressBar Grid.Row="3" Grid.Column="0"         
         Maximum="100"  Height="50"
         Value="76" >
    <telerik:RadCircularProgressBar.ColorRanges>
        <telerik:ProgressBarColorRange Color="GreenYellow" Start="0" End="100"/>
    </telerik:RadCircularProgressBar.ColorRanges>
</telerik:RadCircularProgressBar>
Guang
Top achievements
Rank 1
Iron
 asked on 18 Jan 2024
1 answer
77 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
73 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
1 answer
71 views
<utils:AppointmentStyleSelector x:Key="AppointmentStyleSelector">
    <utils:AppointmentStyleSelector.ArrivedAppointmentStyle>
        <Style TargetType="telerik:AppointmentItem">
            <Setter Property="Background" Value="Green"/>
        </Style>
    </utils:AppointmentStyleSelector.ArrivedAppointmentStyle>
    <utils:AppointmentStyleSelector.IndicatorAppointmentStyle>
        <Style TargetType="telerik:AppointmentItem">
            <Setter Property="Background" Value="Red"/>
        </Style>
    </utils:AppointmentStyleSelector.IndicatorAppointmentStyle>
</utils:AppointmentStyleSelector>

Martin Ivanov
Telerik team
 answered on 15 Jan 2024
1 answer
93 views


Hope there is a way. Thanks

Dominik
Stenly
Telerik team
 answered on 15 Jan 2024
1 answer
182 views

I'm trying to create a file upload or download function to the cloud in WPF.

I heard that this product can upload to the cloud, but I would like to know if it is compatible with all clouds.

I would also like to know the maximum size that can be uploaded.

Martin Ivanov
Telerik team
 answered on 12 Jan 2024
0 answers
118 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
82 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
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
TimeBar
Styling
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?