Telerik Forums
UI for WPF Forum
1 answer
242 views

Hello,

 

i want to merge cells vertically, not only by the contenet but with some kind of ID. In the specific logik i got main objects with multiple compare objects:

A - X - 1
A - X - 2
A - X - 3
B - X - 3
B - X - 4
B - X - 4

the Main Objects have some properties with same values, but these should not merger, only within the same object:

         - 1
A - X - 2
         - 3
         - 3
B - X - 4
         - 4

In the above sample X should only be merged within the the A-object.

I also attached an excel screenshot with similar data (col A and B shoult only merge within the underlining object).

I could imaging to solve this with some kind of "MergingId" and binding a unique GUID to it.

I also found some feedbacks wich could request this behavior:
https://feedback.telerik.com/wpf/1354082-gridview-provide-logic-that-overrides-default-cell-merging-algorithm-preventing-groups-of-cells-from-merging
https://feedback.telerik.com/wpf/1354346-mergedcells-add-option-to-cancel-the-merging-of-specific-cells

Any sugestions how i could achieve this?

regards
Marco

Dinko | Tech Support Engineer
Telerik team
 answered on 14 May 2020
1 answer
102 views

Hello, I've come to a scenario in my project that I need to dynamically create rules and evaluate it on the go.

I kind of need something very similar to what Devops have like in the attached picture.

is there any control that might achieve my needs or at at least a starting point.

 

any help would be appreciated.

 

 

 

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 13 May 2020
3 answers
644 views
Hi,

I am not getting background color changes by changing background property value.


Please helpme.

Martin
Top achievements
Rank 1
Veteran
 answered on 12 May 2020
2 answers
183 views

We are trying to use a ChartView with a LinearAxis for the vertical axis and a CategoricalAxis for the horizontal axis. Our issue is that we can't find a way to limit the number of category items in the horizontal view of the ChartView. We'd like to have a max of 14 items in the view before requiring the user to scroll to see more category items, but as it stands now, the more items that are added to the ChartView, the smaller and smaller the items get until their labels overlap.

Is there a way to limit the view of the ChartView to a max of 14 items so that the user can scroll to the right to see more items?

Thanks!

Pavel
Top achievements
Rank 1
 answered on 12 May 2020
5 answers
1.0K+ views

Hi!

I am trying to create a radar chart, which axis values would change after value update.

 

<telerik:CategoricalDataPoint Category="A" Value="{Binding Path=BoundNumber, Mode=TwoWay}"/>
<telerik:CategoricalDataPoint Category="B" Value="70"/>
<telerik:CategoricalDataPoint Category="C" Value="70"/>

 

I can't bind the value this way, because I get this error:

'Binding' cannot be set on the 'Value' property of type 'CategoricalDataPoint'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.

 

What's the solution?

 

Thanks in advance for your help.

 

Best regard,

Grzegorz Kaczmarczyk


 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 12 May 2020
8 answers
350 views

I have defined a custom TimePickerColum. In my RadGridView I have Validation which when something is not valid shows the row as red and marks the cell which is invalid with a red marker which shows a tooltip when hoovered over.

 

01.public class TimePickerColumn: GridViewDataColumn
02.    {
03.        private Binding timePickerForeground;
04. 
05.        private readonly NullToBrushConverter nullToBrushConverter = new NullToBrushConverter();
06. 
07.        public TimePickerColumn()
08.        {
09.            base.IsReadOnly = true;
10.        }
11. 
12.        public Binding TimePickerBackground { get; set; }
13. 
14.        public Binding TimePickerForeground
15.        {
16.            get => this.timePickerForeground;
17.            set
18.            {
19.                value.Converter = this.nullToBrushConverter;
20.                this.timePickerForeground = value;
21.            }
22.        }
23. 
24.        public TextAlignment TimePickerTextAlinment { get; set; }
25. 
26.        public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
27.        {
28.            if (!(cell.Content is RadTimePicker timePicker))
29.            {
30.                timePicker = new RadTimePicker();
31.                timePicker.SetBinding(RadTimePicker.SelectedValueProperty, DataMemberBinding);
32.                timePicker.SetBinding(RadDatePicker.IsReadOnlyProperty, IsReadOnlyBinding);
33.                timePicker.SetBinding(RadTimePicker.BackgroundProperty, TimePickerBackground);
34.                timePicker.SetBinding(RadTimePicker.ForegroundProperty, TimePickerForeground);
35.                timePicker.TextAlignment = TimePickerTextAlinment;
36. 
37.                cell.Padding = new Thickness(0);
38.            }
39. 
40.            if (timePicker.DataContext != dataItem)
41.            {
42.                timePicker.DataContext = dataItem;
43.            }
44. 
45.            return timePicker;
46.        }
47.    }

The Problem is of visual nature. When a cell other then the time picker cell is invalid, the row turns red but only the TimePicker cell in the row does not turn red. How can I fix this problem ? What am I missing in my TimePickerColumn implementation ? 

If the time picker cell is invalid then it will turn red with the whole row (which is correct).

Vladimir Stoyanov
Telerik team
 answered on 12 May 2020
2 answers
417 views

I would like to find the cell from the name instead of the index. Is it possible?

<telerik:RadGridView ItemsSource="{Binding Tests}"
                                 AutoGenerateColumns="False"
                                 RowLoaded="RadGridView_RowLoaded">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewToggleRowDetailsColumn />
                    <telerik:GridViewDataColumn Header="Title" DataMemberBinding="{Binding Title}" Name="Title" />

                    <telerik:GridViewDataColumn Header="Skapad" DataMemberBinding="{Binding Created}" Name="Modified" />

                </telerik:RadGridView.Columns>

 

 

private void RadGridView_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            if (e.Row is Telerik.Windows.Controls.GridView.GridViewRow)
            {
                if (e.DataElement != null)
                {
                    ClearIfDefaultDate(e.Row.Cells[2].Content as TextBlock);
                }
            }
        }

Fredrik
Top achievements
Rank 1
Veteran
Iron
 answered on 12 May 2020
1 answer
89 views

Hello,

I have a window that contains a RadRibbonView. This RadRibbonView is composed of several RadRibbonBackstage.

 

I changed by code the property FlowDirection of the window to the value RightToLeft.

Because of property value inheritance, this property is supposed to be automatically changed for all child elements.

Here is the visual tree (see capture in attachment):
ATSShell_Mainwindow

    Border

        AdornerDecorator

            AdornerLayer

                BackstageAdorner

                    RadRibbonBackstage

The value of the property FlowDirection is correctly inherited up to the BackstageAdorner (RightToLeft).

But the value of the RadRibbonBackstage is still LeftToRight.

How can I fix that issue ?

 

Thanks,

Alexandre

Martin Ivanov
Telerik team
 answered on 11 May 2020
5 answers
371 views

Hi,

I am trying to add a image in a table cell so that the width of the image is equal to the width of the cell. The PreferredWidth of the cell is set in percentage. I use the following function to get the width of the cell in pixels:

private float GetTableCellwidthInPixels(Table parent, int index) {
            var section = parent.GetRootDocument().EnumerateChildrenOfType<Section>().Last();
            var pageWidth = section.PageSize.Width;
 
            return (float)parent.GetGridColumnWidth(index).Calculate((float)pageWidth);
        }

This works fine if the total preferred widths of all cells on a row is less or equal to 80. If they are larger than 80 the image gets larger than the cell. If I subtract the page margins from the width:

var pageWidth = section.PageSize.Width - section.PageMargin.Horizontal;

the image is always smaller than the cell.

I am doing all this processing before the document is added to the radRichTexBox, so the document is unmeasured.

 

Any idea why this happens?

 

Dimitar
Telerik team
 answered on 11 May 2020
0 answers
130 views

Hello

I'm using trial version 2020.1.218

I'm trying to migrate that example to .NET Core 3.1

https://github.com/telerik/xaml-sdk/tree/master/Docking/VisualStudioDocking

but I faced many issues.

Do you have any updated example (Docking + MVVM) for .NET COre 3.1?

Anton M.
Top achievements
Rank 1
 asked on 11 May 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?