Telerik Forums
UI for WPF Forum
2 answers
318 views
I would like to drag a ListBox item and drop it onto another item. In OnDragOver and OnDrop the sender is the ListBox, but I don't see a way to identify the specific item I am dragging over or dropping on. Is there a way to do that?
Georg
Top achievements
Rank 1
Veteran
 answered on 14 May 2020
1 answer
266 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
114 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
671 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
188 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
365 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
426 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
98 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
384 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
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
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?