Telerik Forums
UI for WPF Forum
2 answers
2.2K+ views

Hi,

How can set text wrapping for the the displayed text of the MultiColumnComboBox control in XAML ?

Regards,
Hans

 

Hans
Top achievements
Rank 1
Veteran
 answered on 21 Oct 2020
7 answers
388 views

Hello

I have a cartesian chart that includes a barchart, which range is fixed and unique, and I have dynamic line series, which are user defined at run time (see attached screenshot).

Each lineseries is bound to a business objects that contains three properties: Color, which will be the color of the series, Code, which is a string that identifies the series, and Coll which is a collactiion of dates + decimals that make the series.

When I add the trackball functionality, I can see the bound values, but I would like to add the Code identifier, as otherwise user cannot tell which is which.

Thanks

Herald

------------------------------------------------------------------

 

<telerik:RadCartesianChart Grid.Row="1" Height="500" VerticalAlignment="Top">
            <telerik:RadCartesianChart.Resources>
                <DataTemplate x:Key="trackBallInfoTemplate">
                    <StackPanel Background="Wheat" Margin="3" Width="100">
                        <StackPanel Orientation="Horizontal">
                            <!--<TextBlock Text="{Binding Code}" FontWeight="Bold" />-->
                            <TextBlock Text="??? - " FontWeight="Bold" />
                            <TextBlock Text="{Binding DataPoint.Value, StringFormat=P2}" />
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadCartesianChart.Resources>
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartSelectionBehavior DataPointSelectionMode="None" />
                <!--<telerik:ChartTooltipBehavior/>-->
                <telerik:ChartTrackBallBehavior />
            </telerik:RadCartesianChart.Behaviors>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis GapLength="0.9" Visibility="Collapsed" ShowLabels="False" TickThickness="0" PlotMode="OnTicks"/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis SmartLabelsMode="None" LabelFormat="P0" LabelStyle="{DynamicResource RagGridViewAxisLabel}"/>
            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.SeriesProvider>
                <telerik:ChartSeriesProvider Source="{Binding LineSeries}">
                    <telerik:ChartSeriesProvider.SeriesDescriptors>
                        <telerik:CategoricalSeriesDescriptor CategoryPath="Date" ValuePath="Value" ItemsSourcePath="Coll">
                            <telerik:CategoricalSeriesDescriptor.Style>
                                <Style TargetType="telerik:LineSeries">            
                                    <Setter Property="StrokeThickness" Value="2" />
                                    <Setter Property="Stroke" Value="{Binding Color, Converter={StaticResource colorToSolidColorBrushValueConverter}}"></Setter>
                                    <Setter Property="TrackBallInfoTemplate" Value="{StaticResource trackBallInfoTemplate}"></Setter>
                                </Style>
                            </telerik:CategoricalSeriesDescriptor.Style>
                        </telerik:CategoricalSeriesDescriptor>
                    </telerik:ChartSeriesProvider.SeriesDescriptors>
                </telerik:ChartSeriesProvider>
            </telerik:RadCartesianChart.SeriesProvider>


            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorXLineDashArray="5 5" MajorYLineDashArray="5 5" MajorLinesVisibility="Y" />
            </telerik:RadCartesianChart.Grid>
            <telerik:RadCartesianChart.Series>
                <telerik:BarSeries CategoryBinding="Date" ValueBinding="Value" ItemsSource="{Binding MainFundChart}" TrackBallInfoTemplate="{StaticResource trackBallInfoTemplate}">
                    <telerik:BarSeries.PointTemplate>
                        <DataTemplate>
                            <Rectangle Width="10" Fill="Green" />
                        </DataTemplate>
                    </telerik:BarSeries.PointTemplate>
                </telerik:BarSeries>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>

--------------------------------------------

 

public class LineSeriesItem
    {
        public string Code { get; set; }
        public ObservableCollection<ChartItem> Coll { get; set; }
        public System.Windows.Media.Color Color { get; set; }
    }

 

public class ChartItem
    {
        public DateTime Date { get; set; }
        public Decimal Value { get; set; }
    }

Herald
Top achievements
Rank 1
Veteran
Iron
 answered on 21 Oct 2020
3 answers
278 views

Hello.

 

I use RadGridView (2018.1.116.45).

I am create columns and set him binding in programm code as 

 

 

column = new GridViewDataColumn
                {
                    ColumnGroupName = args.ColumnDef.ColumnGroupName,
                 
                    DataMemberBinding = new Binding(args.ColumnDef.Member)
                    {
                        Mode = BindingMode.TwoWay,
                        UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
                    },
                    IsReadOnlyBinding = new Binding(args.ColumnDef.IsReadOnlyMember)
                    {
                        Converter = new NullToBooleanConverter {IsInverted = true}
                    },
                   
                    Header = args.ColumnDef.Header,
                    IsVisible = true
                };

If i set cell value from UI all right, but if i set value from code UI not update, only after i select cell and try input value, value which i set erly will be placed in UI cell.

I try update view by programm code as

 var oldCellInfo = MainGrid.CurrentCellInfo;
            var gridViewCellInfo = new GridViewCellInfo(sender, gridViewColumn);
            MainGrid.CurrentCellInfo = gridViewCellInfo;

            MainGrid.CurrentCell?.BeginEdit();
            MainGrid.CurrentCell?.CommitEdit();
            
            MainGrid.CurrentCellInfo = oldCellInfo;
            MainGrid.CurrentCell?.BeginEdit();

            MainGrid.UpdateLayout();

 

But this is not working...

How i can update UI?

 

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Oct 2020
1 answer
218 views

Hi community,

 

I am using the current trial version of Telerik UI for Wpf.

I can not find getters to get a cell value of a calculated column, programmatically. Is there a way to find a simple cell value.

- Documentation of the RadGridView :

 

if ((decimal)radGridView1.Rows[0].Cells["UnitPrice"].Value > 10)

     radGridView1.Rows[0].Cells["UnitPrice"].Value = 10;

 

But when I try radGridView1.Rows... I have the message "No definition for Rows..."

So i can not use the documentation code

 

Thank you

 

Matthieu Meunier

 

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Oct 2020
5 answers
218 views

I've been searching here and any other websites that show up in a search online for anything that seemed answer my question but haven't seen anything yet.

I'm looking for a way to prevent appointments from being automatically selected when they have been updated. My appointments are removed and re-added to their collection, which appears to be the only way to successfully update the UI per this forum. I think it was this post I found, for those who are curious - https://www.telerik.com/forums/update-ui-after-collection-of-appointment-change

My problem is this: background logic is updating appointments and when using the schedule the appointment selection is constantly changed to the last updated appointment. This makes selecting and interacting with other appointments difficult. I won't rule out that my implementation may be incorrect, but I believe I have done well so far thanks to this forum.

 

Clifford
Top achievements
Rank 1
 answered on 19 Oct 2020
5 answers
376 views

Hi

Nice work with the new Callout-control, exactly what I needed!

 

1)

Im looking at the documentation, and I have a hard time figuring out how to popup a button on a button clicked for MVVM approach 

(I have a (i)-symbol on a button for each row in my grid that should show a popup/callout with more information for that row)

2) 

Are there example on formatted callout content (newline and bold, mostly needed)

 

 

/Thanks in advance, Robert

Dinko | Tech Support Engineer
Telerik team
 answered on 19 Oct 2020
22 answers
5.1K+ views
Hi everyone !
I want to change item background color when select or mouse hover , help me please !
Martin Ivanov
Telerik team
 answered on 16 Oct 2020
9 answers
1.0K+ views

Hello

I need a racombobox with checkbox with multiselect and "select all" option, so I used the example from this thread : https://www.telerik.com/forums/radcombobox-with-checkbox-with-multi-select-(using-mvvm)

It works well, but I need it into a radgridview which could have a scrollbar and in this case I got an excepetion when I use the scroll of the radgridview.

It's fire the event OnSelectedItemsPropertyChanged change and so the sub Transfer is called but as the collection changed the Transfer sub crach.

 

I tried to put the radcombobox into a stack panel in order to prevent firing of event but it doesn't work :(

Here the code :

<telerik:RadGridView Margin="6,10,6,32.96" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" CanUserReorderColumns="False"
                             CanUserResizeColumns="True" CanUserSortColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False" ItemsSource="{Binding Rules}"
                             SelectedItem="{Binding SelectedRule}" IsReadOnly="{Binding OnlyRead}"
                             AutoGenerateColumns="False">
 
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn Header="Jib Geometry" Width="100">
                            <telerik:GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                    <telerik:RadComboBox ItemsSource="{Binding JibGeometryDataContexts}" Margin="5,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"
                                                 Height="22" AllowMultipleSelection="True" EmptyText="Select jib geometry" Grid.Column="1" IsEditable="False" ItemTemplate="{StaticResource MultiSelectComboTemplate}"
                                                 Style="{StaticResource CheckBoxRadComboBox}" MultipleSelectionBoxTemplate="{StaticResource MultiSelectedBoxTemplate}" DropDownClosed="RadComboBox_DropDownClosed">
                                        <i:Interaction.Behaviors>
                                            <combobox:SelectedItemsBehavior SelectedItems="{Binding SelectedJibGeometryDataContexts}" />
                                        </i:Interaction.Behaviors>
                                    </telerik:RadComboBox>
                                    </StackPanel>
                                </DataTemplate>
                            </telerik:GridViewColumn.CellTemplate>
                        </telerik:GridViewDataColumn>                                             
                        ...
                    </telerik:RadGridView.Columns>
 
                </telerik:RadGridView>

 

crash on :

Public Shared Sub Transfer(ByVal source As IList, ByVal target As IList)
            If source Is Nothing OrElse target Is Nothing Then Return
            target.Clear()
 
            For Each o In source
                target.Add(o)
            Next
        End Sub

 

Do you have any Idea to fix these crashes ?

Thanks

Regards

J-Christophe

Dilyan Traykov
Telerik team
 answered on 16 Oct 2020
2 answers
1.1K+ views

Hi all,

I have a grid that uses the GridViewComboBoxColumn column type.  We're trying to give it very fast action.  We want the cell to commit the edit and exit edit mode immediately after selecting a value in the combo box of the column.

How can this be done?  I see there's a RadMultiColumnComboBox.SelectionChanged event where an EndEdit could be called, but we're not using multi-column combo boxes.

Thanks!
Matt

Matt
Top achievements
Rank 1
Veteran
 answered on 16 Oct 2020
4 answers
235 views

Hello,

 

I have tested a specific .pdf file in Adobe Reader, Chrome and Edge, in all viewers the pdf loads without issues and all text is visible.

This is not the case in PDFViewer, the content is obscured in some way (marked in red rectangles on screens). I have tested it on the demo preview of features.

Would it be possible to fix this issue?

 

I'm attaching  the difference in views example in PDFViewer and Edge.

It is not possible to attach the .pdf file in question, can i provide this file in any other way?

Thank you.

Martin
Telerik team
 answered on 16 Oct 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?