Telerik Forums
UI for WPF Forum
3 answers
237 views
ItemsIndent works well with nodes containing children.  But then on a leaf node it doesn't.  Is there a way to move the leaf node further to the left?  See image attached for depiction.

<UserControl x:Class="MyApp.ToolboxControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <DataTemplate x:Key="Level1">
            <Grid Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  />
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" Source="{Binding ImageUrl}" Stretch="None"/>
                <TextBlock Grid.Column="1" Text="{Binding Name}"/>
            </Grid>
        </DataTemplate>
 
        <HierarchicalDataTemplate x:Key="Level2"
                                  ItemsSource="{Binding Items}"
                                  ItemTemplate="{StaticResource Level1}">
            <Grid Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  />
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" Source="{Binding ImageUrl}" Stretch="None"/>
                <TextBlock Grid.Column="1" Text="{Binding Name}"/>
            </Grid>
        </HierarchicalDataTemplate>
        <HierarchicalDataTemplate x:Key="Level3"
                                  ItemsSource="{Binding Items}"
                                  ItemTemplate="{StaticResource Level2}">
            <Grid Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" Source="{Binding ImageUrl}" Stretch="None"/>
                <TextBlock Grid.Column="1" Text="{Binding Name}"/>
            </Grid>
        </HierarchicalDataTemplate>
    </UserControl.Resources>
    <Grid>
        <telerik:RadTreeView ItemsSource="{Binding Items}"
                             ItemTemplate="{StaticResource Level3}"
                             ItemsIndent="10"/>
    </Grid>
</UserControl>
Milena
Telerik team
 answered on 13 Mar 2015
1 answer
191 views
Hello,

I'm using PieChart with VM-binding and have ArgumentNullException exception in ChartSelectionBehavior.Branch.cs:
internal void UpdateSelectedPointsAndRaiseSelectionChanged()
        {
            var oldSelectedPoints = this.chart.SelectedPoints; // SelectedPoints is always null
            var newSelectedPoints = this.GetSelectedPoints();
 
            ////var oldSelectedSeries = this.chart.SelectedSeries;
            ////var newSelectedSeries = this.GetSelectedSeries();
 
            var addedPoints = newSelectedPoints.Except(oldSelectedPoints).ToList(); //exception here
            var removedPoints = oldSelectedPoints.Except(newSelectedPoints).ToList();

My XAML:
<telerik:RadPieChart SelectedPoints="{Binding SelectedPoints}">
    <telerik:RadPieChart.Resources>
        <Style x:Key="PieSliceStyle" TargetType="Path">
            <Setter Property="Fill" Value="{Binding DataItem.Brush}" />
        </Style>
    </telerik:RadPieChart.Resources>
    <telerik:RadPieChart.SmartLabelsStrategy>
        <telerik:PieChartSmartLabelsStrategy DisplayMode="SpiderAlignedOutwards"/>
    </telerik:RadPieChart.SmartLabelsStrategy>
    <telerik:RadPieChart.Behaviors>
        <telerik:ChartSelectionBehavior DataPointSelectionMode="Multiple"
                                        x:Name="PieSelectionBehavior"/>
    </telerik:RadPieChart.Behaviors>
    <telerik:RadPieChart.Series>
        <telerik:DoughnutSeries ItemsSource="{Binding PieChartErrors}"
                                ValueBinding="Count"
                                DefaultSliceStyle="{StaticResource PieSliceStyle}">
            <telerik:DoughnutSeries.LegendSettings>
                <telerik:DataPointLegendSettings TitleBinding="Description"/>
            </telerik:DoughnutSeries.LegendSettings>
            <telerik:DoughnutSeries.LabelConnectorsSettings>
                <telerik:ChartSeriesLabelConnectorsSettings/>
            </telerik:DoughnutSeries.LabelConnectorsSettings>
        </telerik:DoughnutSeries>
    </telerik:RadPieChart.Series>
</telerik:RadPieChart>

ViewModel:
public class ErrorsAndWarningsViewModel : Page
{
    private IObservableCollection<PieChartError> _pieChartErrors;
    private ReadOnlyDataPointCollection _selectedPoints;
 
    public ErrorsAndWarningsViewModel
    {
        PieChartErrors = new BindableCollection<PieChartError>();
        SelectedPoints = new ReadOnlyDataPointCollection();
    }
 
    public IObservableCollection<PieChartError> PieChartErrors
    {
        get { return _pieChartErrors; }
        set
        {
            if (Equals(value, _pieChartErrors))
            {
                return;
            }
            _pieChartErrors = value;
            NotifyOfPropertyChange();
        }
    }
 
    public ReadOnlyDataPointCollection SelectedPoints
    {
        get { return _selectedPoints; }
        set
        {
            _selectedPoints = value;
            NotifyOfPropertyChange();
        }
    }
 
    public class PieChartError
    {
        public string Description { get; set; }
        public int Count { get; set; }
        public Brush Brush { get; set; }
    }
}

What am I doing wrong?
Martin Ivanov
Telerik team
 answered on 12 Mar 2015
1 answer
196 views
Hi,
When I try to copy a lot of data from my grid to the excel sheet, some rows are missing.

I found this solution on your forum

private void gridview_Copying(object sender, RadRoutedEventArgs e)
{
var obj = Clipboard.GetDataObject();
           var data = obj.GetData(DataFormats.Text);
           Clipboard.SetData(DataFormats.Text, data);
...
}

All data now are copied to excel but if into a cell there is a newline char, excel will create a new row
How can I fix it?

Another question..
I read that when I copy from grid on the clipboard all data are saved as html, csv and txt
My grid has around 500 000 cells, and the coping operation is not performed at all.
I think the problem is the html, and I need only the data without any kind of formatting.
So is it possible to saved only the txt on the clipboard?

Thanks

Maya
Telerik team
 answered on 12 Mar 2015
1 answer
101 views
Dear Reader,

First i'm sorry for my bad english.

I would like know, how update the ChartAxisLabelFormat in RadChart ?

I have it : http://www.casimages.com/i/15031104592612847.png (default value)

And what i want (I want binding with MySQL Data Table) : http://www.casimages.com/i/150311050226369990.png

Thanks you.

Cordialy yours,

DEFRANCE
Peshito
Telerik team
 answered on 12 Mar 2015
3 answers
154 views
I found that you said we have problem with Tabindex of RadAutoCompleteBox in Link
Was this problem fixed?
Kalin
Telerik team
 answered on 12 Mar 2015
1 answer
87 views
Hello, I tried implicit style with RadWindow as the main WIndow.
No problem, except with the VS2013 theme : when the radwindow is maximised, I've git 2 or 3 pixels at the bottom and the right side of the window. I don't have those pixels with other themes, and the RadWindow is perfectly maximised...
Thanks.
Masha
Telerik team
 answered on 12 Mar 2015
8 answers
115 views
Hi,

I'm facing a problem with ordering and filtering for Gridview control. For some reason '100' is considered smaller than 60 or 90. I think you can understand the problem better from the attached screenshot. 
Ejaz
Top achievements
Rank 1
 answered on 12 Mar 2015
2 answers
220 views
I am using the spreadsheet to gather input from my users. We do the validation, however, to really make this program pop it would be great if there is a way to change the cell border color to a red boarder with a gradient starting from the cell boundary and moving inward so looking at the program it would be easy to find which values are out of range.  I have tried using the brush and gradient but I can only do it for the whole page.  I would settle for just changing the background of an out of range cell to red.  Are there any samples you can point me to?

Thanks, great control by the way.

John
John
Top achievements
Rank 1
 answered on 11 Mar 2015
2 answers
441 views
Hello,

In my application I have a RadTimeline control which has a custom row index generator like this:

class CustomRowIndexGenerator : IItemRowIndexGenerator
    {
        public void GenerateRowIndexes(List<TimelineRowItem> dataItems)
        {
            foreach(TimelineRowItem item in dataItems)
            {
                if (item.RowIndex > 0)
                    item.RowIndex = 0;
            }
        }
    }

This is because when some items share a time space I want them to overlap and show them in a single row. 

When this occur, the newest item is shown on the top.

I'd like to know if it is possible to show the items in the opposite way, the oldest item on top.

I've attached an image to show my case, first a normal case (no overlap), then a case using the row index generator (overlaping items) and the last one, the case that I'd like to accomplish.

Thanks in advance,

Alberto


Amige
Top achievements
Rank 1
Veteran
 answered on 11 Mar 2015
2 answers
156 views
Hi,
How can I change the language of the default controls captions without change Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture?

For example:
PC language and cultureinfo are set as ITA
SW language is set as EN and culture info as ITA

I need to keep the number and date format setting as ITA and captions as EN

Thanks
Mattia
Top achievements
Rank 2
 answered on 11 Mar 2015
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?