Telerik Forums
UI for WPF Forum
1 answer
97 views

RadGridView when source is RadDataPager + IQueryable/QueryableCollectionView:

RadGridView when source is RadDataPager + QueryableDataServiceCollectionView:

Why is the filter list empty when using IQueryable/QueryableCollectionView and how to fix this? Sample attached.

Stenly
Telerik team
 answered on 21 May 2024
1 answer
66 views

WPF Chart - Empty Values - Telerik UI for WPF

I have added link for EmptyPointBehaviour for wpf but it's available for windows, I want to implement same for wpf or uwp xaml UI. 

Martin Ivanov
Telerik team
 answered on 21 May 2024
1 answer
134 views

Hi,

I use this behavior to manage multiple selection on radgridview (with selection mode = "extended" and with GridViewSelectColumn)

It works but when I try to initialize the selection with some items at the end of initialization I receive the OnSelectionChanged that remove all the elements selected but the first.

public class GridViewMultiSelect : Behavior<RadGridView>
{
	protected override void OnAttached()
	{
		base.OnAttached();
		AssociatedObject.DataContextChanged += OnDataContextChanged;
		AssociatedObject.SelectedItems.CollectionChanged += OnSelectedItemsChanged;
		AssociatedObject.SelectionChanging += OnSelectionChanged;
		AssociatedObject.Items.CollectionChanged += OnItemsChanged;
	}

	private void OnSelectionChanged(object? sender, SelectionChangingEventArgs e)
	{
		
	}

	private void OnItemsChanged(object? sender, NotifyCollectionChangedEventArgs e)
	{
	}

	private void Select(IEnumerable<NsMisuraViewWithType> misure)
	{
		foreach (var item in misure)
		{
			AssociatedObject.SelectedItems.Add(item);
		}
	}

	private void OnDataContextChanged(object? sender, DependencyPropertyChangedEventArgs e)
	{
		if (AssociatedObject.DataContext is LoadedMeasurmentsVM viewModel)
		{
			viewModel.SelectAction = Select;
			SetSelectMeasurements();
		}
	}

	private void SetSelectMeasurements()
	{
		if (AssociatedObject.DataContext is LoadedMeasurmentsVM viewModel)
		{
			foreach (var item in AssociatedObject.SelectedItems)
			{
				if (viewModel.SelectedMeasurements.All(m => m.Misura.Id != ((NsMisuraViewWithType)item).Misura.Id))
				{
					viewModel.SelectedMeasurements.Add((NsMisuraViewWithType)item);
				}
			}
		}
	}

	private void OnSelectedItemsChanged(object? sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
	{
		SetSelectMeasurements();
	}

	protected override void OnDetaching()
	{
		base.OnDetaching();
		AssociatedObject.DataContextChanged -= OnDataContextChanged;
		AssociatedObject.SelectedItems.CollectionChanged -= OnSelectedItemsChanged;
	}
}
Dimitar
Telerik team
 answered on 21 May 2024
0 answers
67 views

Hi,

in my project there is one RadGridView is present. Inside it there is GridViewComboBoxColumn but whenver I am selecting other item from that comboboxcell, binded property setter is not being called and as a result datacontext also remains same.

But whenever cell of that combobox column loses the focus property setter is called and as a result datacontext is fixed.

 So, I found one workaround that is I added UpdateSourceTrigger=PropertyChanged property for my DataMemberBinding like below:
DataMemberBinding="{Binding ****, UpdateSourceTrigger=PropertyChanged}"


So it started working whenever I am selecting other item from that comboboxcell, binded property setter is being called and as a result datacontext also updated.

But the issue is that whenever 
comboboxcell loses its focus then again binded property setter is called the second time, which I don't want.

Shraddha
Top achievements
Rank 1
 asked on 21 May 2024
0 answers
132 views
I have a telerik radRichTextbox that I need to set some defaults on for all areas that it is dynamically generated but nothing I am doing is working.

Here is my XAML set up below.
        <telerik:HtmlDataProvider RichTextBox="{Binding ElementName=radRichTextBox}" Html="{Binding MyRichText, Mode=TwoWay, NotifyOnValidationError=true, TargetNullValue='', ValidatesOnExceptions=true}">
            <telerik:HtmlDataProvider.FormatProvider>
                <telerik:HtmlFormatProvider>
                    <telerik:HtmlFormatProvider.ExportSettings>
                        <telerik:HtmlExportSettings DocumentExportLevel="Fragment"
ImageExportMode="AutomaticInline"
StyleRepositoryExportMode="DontExportStyles"
StylesExportMode="Inline"
ExportEmptyDocumentAsEmptyString="True"      
/>
                    </telerik:HtmlFormatProvider.ExportSettings>
                </telerik:HtmlFormatProvider>
            </telerik:HtmlDataProvider.FormatProvider>
        </telerik:HtmlDataProvider>

<telerik:RadRichTextBox x:Name="radRichTextBox" DocumentInheritsDefaultStyleSettings="True" Foreground="black" FontFamily="Times New Roman" FontSize="12"   Padding="10">
</telerik:RadRichTextBox>


What is the proper way to default to SINGLE line spacing and fontsize 12 with font family of Times New Roman?

Obviously the user should be able to change if they wish but I need it to atleast default initially to these values.
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 17 May 2024
1 answer
80 views

How can I show animation like the following video in diagram control with pause and play option?

Which control is used in the following image?

Martin Ivanov
Telerik team
 answered on 16 May 2024
1 answer
93 views

Hi,

in my project there is one RadGridView is present. Inside it there is GridViewComboBoxColumn but whenver I am selecting other item from that comboboxcell, binded property setter is not being called and as a result datacontext also remains same.

But whenever cell of that combobox column loses the focus property setter is called and as a result datacontext is fixed.

 

Please suggest fixes for this one.

 

Also is there any way to manually update datacontext ? If yes then how to retrieve changed places and how to update them in datacontext using selection change listener?

Dimitar
Telerik team
 answered on 16 May 2024
0 answers
68 views
When the RadDocking control is added, the window will blank for a moment and then display normally
Telerik
Top achievements
Rank 1
 updated question on 16 May 2024
0 answers
78 views
I am trying to customize the style of a RadRichTextBox. Previously with the standard RichTextBox you could target Textbox base and do a datatrigger to bind to IsKeyboard focused in XAML to change the background if the user had clicked inside the richtextbox to insert or type.

Does the RadRichTextBox have something similar? How can I check to see if it is selected?
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 15 May 2024
1 answer
99 views

Hi, I followed the steps on how to save / load filters on my c# WPF app from this link and it is working correctly

https://docs.telerik.com/devtools/wpf/controls/radgridview/filtering/how-to/howto-save-and-load-filter-settings

My grid is filtered and it works for all the columns (Just in case it wasn’t clear, the grid is indeed filtered by Source and Order Id). For all the fields that are strings, the filters look good when it shows:

But the fields that are enums, The header shows the icon as if a filter has been applied, but when it shows me the list, the values are not checked:


Code:

<telerik:RadGridView 
    x:Name="DesignQueueOrderGridView"
    ShowGroupPanel="False" 
    AutoGenerateColumns="False" 
    ItemsSource="{Binding FilteredDesignQueueOrderViewModels}"
    RowDetailsVisibilityMode="Visible"
    RowIndicatorVisibility="Collapsed"
    Grid.Row="1"
    VerticalAlignment="Top"
    RowStyle="{StaticResource RowStyleOdd}" 
    AlternationCount="2" 
    AlternateRowStyle="{StaticResource RowStyleEven}"
    CanUserSortColumns="False">

 

<telerik:GridViewDataColumn 
        UniqueName="ImageSource"
        Header="Source"
        HeaderTextAlignment="Center"
        DataMemberBinding="{Binding ImageSource}"
        IsReadOnly="True">

<telerik:GridViewDataColumn DataMemberBinding="{Binding UserId}" UniqueName="UserId"

                

                            HeaderTextAlignment="Center" 
                            Header="User Id" 
                            IsReadOnly="True"/>

              </telerik:GridViewDataColumn>

Enum:

[DataContract]
public enum ImageSource
{
    [EnumMember]
    Unknown = 0,

    [EnumMember]
    OnlineDesigner = 1

}

public void LoadColumnFilters(IList<FilterSetting> savedSettings)
{
    Application.Current.Dispatcher.Invoke(() =>
    {
        GridViewDataControl.FilterDescriptors.SuspendNotifications();

        foreach (FilterSetting setting in savedSettings)
        {
            Telerik.Windows.Controls.GridViewColumn column = GridViewDataControl.Columns[setting.ColumnUniqueName];

            if (column is null)
                continue;

            IColumnFilterDescriptor columnFilter = column.ColumnFilterDescriptor;

            if (setting.SelectedDistinctValues is not null)
            {
                foreach (string? distinctValue in setting.SelectedDistinctValues)
                {
                    columnFilter.DistinctFilter.AddDistinctValue(distinctValue);
                }
            }
        }

        GridViewDataControl.FilterDescriptors.ResumeNotifications();
    });
}

 

Thank you in advance! Juan

Martin Ivanov
Telerik team
 answered on 13 May 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?