Telerik Forums
UI for WPF Forum
1 answer
99 views

Can I link between Connection and Connection?

If it possible, tell me please,,,

 

Dilyan Traykov
Telerik team
 answered on 17 Jan 2022
1 answer
380 views

hello.

I used the scroll synchronization function in two gridviews through the linked example.
https://www.telerik.com/forums/scrolling-two-grids-f949e02b84ab

Since this is an old version, the ShowSearchPanel property does not exist.

If I put a SearchPanel in "PART_VerticalScrollBar", two objects appear.

When SearchPanel=true, the first is the VerticalScrollBar of SearchPanel, and the second is the VerticalScrollBar of the GridView.

When SearchPanel=false, only VerticalScrollBar of GridView is displayed.

How can I identify the "PART_VerticalScrollBar" of the GridView when the user uses the SearchPanel as a variable? I guess you shouldn't use "LastOrDefault".

Thanks.

Martin Ivanov
Telerik team
 answered on 14 Jan 2022
2 answers
204 views
Hello. How to make the field fill the width of the container and not stretch to fit the text. Two pictures in the attachment. In the second image, the PropertyGrid extends outside the container. 
Stenly
Telerik team
 answered on 14 Jan 2022
2 answers
158 views
Hello.

This is similar to my most recent post.

Is the current example also not recommended? This is a row style using Visivility Hidden Converter.
I can see the opposite grid row when checked.

Here, I gave "AlternationCount" and the data is displayed with a gray background.

However, it is not visible when using the Search filter. (Visible when checked)

This seems like a bug.
Please confirm.

Thanks.
Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
 answered on 13 Jan 2022
1 answer
114 views

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 : ulong

Looks 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)
   at Telerik.Windows.Data.Expressions.FilterDescriptorExpressionBuilder.CreateLeftOperandExpression()
   at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterExpressionBuilder.CreateFilterExpression()
   at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, CompositeFilterDescriptorCollection filterDescriptors)
   at Telerik.Windows.Data.QueryableCollectionView.CreateView()
   at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalCount()
   at Telerik.Windows.Data.QueryableCollectionView.get_IsEmpty()
   at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
   at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
   at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
   at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsChanged()
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
   at Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter)
   at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
   at Telerik.Windows.Controls.GridView.SearchPanel.SearchViewModel.set_SearchText(String value)'
Eldoir
Top achievements
Rank 2
Iron
Iron
Iron
 updated answer on 12 Jan 2022
1 answer
232 views

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?

Stenly
Telerik team
 answered on 12 Jan 2022
2 answers
758 views

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

Martin Ivanov
Telerik team
 answered on 10 Jan 2022
1 answer
191 views

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.

Martin Ivanov
Telerik team
 answered on 10 Jan 2022
1 answer
143 views

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);

Martin Ivanov
Telerik team
 answered on 07 Jan 2022
1 answer
219 views
Is there a way to control the visibility of the Content of a RadPathButton via some property?  From the documentation it seems not but the ControlTemplate makes it appear otherwise.

Background: I was looking into making a RadPathButton that would hide its content (and only show the PathGeometry) when it got small enough.  My idea was either to derive a class from this or to create a WPF Behavior that added a ContentVisibility  DependencyProperty to take care of this for me.  Then I would write my own style with my own ControlTemplate to honor this property

But when I looked at Telerik's ControlTemplate for RadPathButton (in the Windows8Touch theme) I saw a  reference to "ContentVisibilityStates" group in the VisualStateManager section that looked like what I need.  It has a Visible and Collapsed states.  If I could find a way to make the control enter the Collapsed state, it would collapse the content exactly as I desire.

However I cannot see any sort of property that binds to this.  So how is it changed?  Is it possible for me to bind some property to the button to make its content disappear when I need it to?
<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>

Stenly
Telerik team
 answered on 06 Jan 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?