Hi,
I'm trying to toggle the visibility of my columns based on the input of the search panel. My goal is to achieve something similar to this.
So I have created a very simple behavior like this:
internal class SearchColumnsByNameBehavior : Behavior<RadGridView>
{
protected override void OnAttached()
{
base.OnAttached();
AssociatedObject.ShowSearchPanel = true;
AssociatedObject.Searching += OnSearching;
}
protected override void OnDetaching()
{
AssociatedObject.Searching -= OnSearching;
base.OnDetaching();
}
private void OnSearching(object sender, GridViewSearchingEventArgs args)
{
foreach (GridViewColumn column in AssociatedObject.Columns)
{
string columnHeader = column.Header?.ToString();
if (!string.IsNullOrEmpty(columnHeader))
{
column.IsVisible = columnHeader.Contains(args.SearchText);
}
}
}
}Unfortunately, when typing text in the textbox of the search panel, I get the following exception:
'No coercion operator is defined between types 'System.String' and 'MyProject.SomeClass+MyEnum'
Where 'MyEnum' is of type:
[Flags] enum MyEnum : ulongLooks like there are things done under the hood of the search panel that I don't know about, or is it the '+' that is actually the real problem here?
What am I supposed to do? Thanks in advance!
Full stacktrace:
System.Linq.Expressions.Expression.GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType)Hello, I have a RadRibbonGroup with content that I want to fill all available space in the group.
The content is intended to be more advanced, but in its most simple form it can be demonstrated with a textbox like this:
<telerik:RadRibbonGroup Header="My group" Width="200" Height="100">
<TextBox av:Text="Some text"/>
</telerik:RadRibbonGroup>The size of the RadRibbonGroup is set dynamically but in the example is locked to a static size. In this case I want the content of the group (the textbox) to stretch in all directions. Vertically this works works as expected and the textbox is stretched by default and can be set to top, bottom, etc. with the VerticalAlignment property. However, everything i do horizontally seems to be ignored.
The attached image demonstrates how the code above looks and what I want it to do. How do I make this work?
Hello,
I'm doing a generic UserControl so I have no idea of the number of columns and their names. This is the reason why I'm using GridViewHeaderRow instead of GridVIewHeaderCell. My columns are AutoGenerated.
The main is that :
I edit the style like this =>
<Style x:Key="HeaderRowStyle" TargetType="telerik:GridViewHeaderRow">
<Setter Property="Background" Value="#FF606366"></Setter>
<Setter Property="FontWeight" Value="Medium"></Setter>
</Style>I need to as this background on the mouse over the header.
I tried a few things like using the Setter of the property template and using the Trigger of IsMouseOver but it's not working.
Perhaps the trigger was the good solution and I was just missing a few properties?
Thanks in advance

Is there an option to use filters, column filters, sorting and/or searching in the WPF RadGanttView?
It would be very handy for bigger plans in the GanttView to find stuff, or get a better overview and so on.

I have a RadGanttView in which you can change the task in the columns. So if I click into the cells I can edit the value in it. After the Editing I do a validation. If this validation fails, a errormessage is shown. If this message is showing, I have to set the wrong cell in edit mode. But I wasn't able to do that.
How can I set a specific cell to edit-mode by code?
I already tried so call the TaskEdititngEvent, but didn't work as excpected:
var editingEventArgs = new TaskEditingEventArgs(RadGanttView.TaskEditingEvent, neuerTask);
GanttDiagramm.RaiseEvent(editingEventArgs);
<VisualStateGroup x:Name="ContentVisibilityStates">
<VisualState x:Name="Visible" />
<VisualState x:Name="Collapsed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
Hello.
There are two gridviews.
These gridviews are connected 1:1 with the row.
So I'm done with the vertical scrolling synchronization.
All data is now displayed.
When I check here, I want to show the contents of the gridview on the other side.
When the GridView Checkbox Column is unchecked, I want to make it impossible to see the contents of the grid view on the other side.
This should be done with Rows only and not all data.
What method do you have?
I attach an example.
In case of additional scroll sync, it is written as a code-behind. Can you change this to MVVM pattern?(How to get 2 gridview parameters since EventToCommandBehavior event is loaded?)
Thanks.
I'm having some real struggles with RadComboBox ...
<telerik:RadComboBox x:Name="ModelPicker"
Width="150"
Height="28"
CanAutocompleteSelectItems="False"
DisplayMemberPath="ModelNavn"
IsEditable="True"
IsEnabled="{Binding CanChangeVariant}"
ItemsSource="{Binding Source={StaticResource SortedModels}}"
OpenDropDownOnFocus="True"
SelectAllTextEvent="GotFocus"
SelectedItem="{Binding BrandModel.SelectedCarModel}"
StaysOpenOnEdit="True" />
1. ComboBox is AutoSelecting first element when ItemsSource changes
ItemsSource is set to an ObservableCollection<model> and the DataContext implements INotifyPropertyChanged (pretty straight forward MVVM)
I've tested and found that if I REPLACE the ObservableCollection instead of Clear() + Add() , the UI update is MUCH faster.
eg:
ItemsSource="{Binding MyModels}"
MyModels = new ObservableCollection<model>(/* List of Models */);
HOWEVER - this causes the RadComboBox to AutoSelect the first element !!!
(to be fair - this is actually also how Microsoft WPF ComboBox works) .. :-(
2. CanAutocompleteSelectItems="False" is ignored
On almost every keystroke I do when AutoCompleting / Filtering - the ComboBox selects whatever item is partially matching
eg : list contains 1000, 114i, 114 and 114d
if I write "1" then 1000 is selected,
if I write "114d" and delete "d" then 114 gets selected.
I'm pretty sure that CanAutoCompleteSelectItems=false should prevent this ??
Hello.
I'm trying to use the "Column Chooser" from the telerik SDK.
The SDK is in a state where both ID and Name can be controlled Visible.
I want to change a specific column to be fixed.
For example, ID and Name in the SDK example. I want only Name to be IsVisible, excluding ID from Listbox.
(ID is always shown)
Is it possible to simply control it in xaml? Or do I need extra work in the viewmodel?
I'm using the "declarative column definition method using the DataMemberBinding property set".
thanks.