Telerik Forums
UI for WPF Forum
2 answers
166 views

It seems that the two don't get along. Code:

<Window x:Class="DeferredModeAndRowsReorder.MainWindow"
        xmlns:local="clr-namespace:DeferredModeAndRowsReorder"
        Title="MainWindow" Height="350" Width="525" WindowState="Maximized">
     
    <Grid>
        <Grid.Resources>
            <Style TargetType="telerik:GridViewRow"
                   x:Key="DraggedRowStyle">
                <Setter Property="telerik:DragDropManager.AllowDrag"
                        Value="True" />
                <Setter Property="telerik:DragDropManager.TouchDragTrigger"
                        Value="TapAndHold"/>
            </Style>
        </Grid.Resources>
         
        <telerik:RadDocking x:Name="radDocking" DragDropMode="Deferred" CloseButtonPosition="InPaneAndGroup">
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer x:Name="dh">
                    <telerik:RadPaneGroup x:Name="dg">
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>
 
            <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="170,150" MaxWidth="600"
                    Name="LeftContainer" InitialPosition="DockedLeft">
                <telerik:RadPaneGroup x:Name="Group1">
                    <telerik:RadPane CanUserClose="False" x:Name="Pane1" Header="Server Explorer" CanDockInDocumentHost="False">
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
 
            <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="170,150" MaxWidth="600" Orientation="Vertical"
                    Name="RightContainer" InitialPosition="DockedRight">
                <telerik:RadPaneGroup x:Name="Group2">
                    <telerik:RadPane CanUserClose="False" x:Name="Pane2" Header="Toolbox" CanDockInDocumentHost="False">
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
 
                <telerik:RadPaneGroup x:Name="Group3">
                    <telerik:RadPane CanUserClose="False" x:Name="Pane3" Header="Properties" CanDockInDocumentHost="False">
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
 
            <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="170,300" Orientation="Horizontal"
                    Name="BottomContainer" InitialPosition="DockedBottom">
                <telerik:RadPaneGroup>
                    <telerik:RadPane CanUserClose="False" Header="System" CanDockInDocumentHost="False">
                    </telerik:RadPane>
                    <telerik:RadPane CanUserClose="False" IsSelected="True" Header="Global" CanDockInDocumentHost="False">
                    </telerik:RadPane>
                    <telerik:RadPane CanUserClose="False" Header="Watch" CanDockInDocumentHost="False">
                        <telerik:RadGridView x:Name="RadGridView1" GroupRenderMode="Flat"
                             ShowGroupPanel="False" CanUserResizeRows="True"
                             ItemsSource="{Binding Items}"
                             RowStyle="{StaticResource DraggedRowStyle}"
                             AllowDrop="True"
                             CanUserSortColumns="False"
                             IsFilteringAllowed="False"
                             local:RowReorderBehavior.IsEnabled="True"
                             telerik:ScrollingSettingsBehavior.IsEnabled="True"
                             telerik:ScrollingSettingsBehavior.ScrollAreaPadding="30"
                             telerik:ScrollingSettingsBehavior.ScrollStep="24"
                             telerik:ScrollingSettingsBehavior.ScrollStepTime="00:00:00.05">
                            <telerik:RadGridView.Resources>
                                <DataTemplate x:Key="DraggedItemTemplate">
                                    <StackPanel>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="Dragging:" />
                                            <TextBlock Text="{Binding CurrentDraggedItem}"
                                       FontWeight="Bold" />
                                        </StackPanel>
                                        <StackPanel Orientation="Horizontal">
                                            <TextBlock Text="{Binding CurrentDropPosition}"
                                       FontWeight="Bold"
                                       MinWidth="45" />
                                            <TextBlock Text=", ("
                                       Foreground="Gray" />
                                            <TextBlock Text="{Binding CurrentDraggedOverItem}" />
                                            <TextBlock Text=")"
                                       Foreground="Gray" />
                                        </StackPanel>
                                    </StackPanel>
                                </DataTemplate>
                            </telerik:RadGridView.Resources>
                        </telerik:RadGridView>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>
</Window>

 

And I just generated a simple items source in the code behind:

     public partial class MainWindow : Window
    {
        private ObservableCollection<int> _items = new ObservableCollection<int>();
 
        public MainWindow()
        {
            InitializeComponent();
 
            for (int i = 0; i < 1000; i++)
            {
                _items.Add(i);
            }
 
            this.DataContext = this;
        }
 
        public ObservableCollection<int> Items
        {
            get
            {
                return _items;
            }
        }
    }

 

The row reorder behavior code is taken from your examples. When trying to reorder rows, then I see the deferred mode adorner and the docking compasses.

This is not the only problem. Try reordering the rows... After few drag and drops (Usually a quick drag and drop), the "Watch" pane (where the GridView was in) will disappear (because it was removed from its original group and added a some group with no items).

 

Nasko
Telerik team
 answered on 11 May 2016
3 answers
93 views
I have a gridview that has some errors using DataErrorInfo. When in edit mode, I use cell_validating to potentially set an edit error. However, I then get 2 error controls (red border) overlapping each other. Is it possible to hide or switch off the data layer errors whilst in edit mode?
Stefan Nenchev
Telerik team
 answered on 11 May 2016
2 answers
173 views

Hello,

 

I have a column in which I use a converter to create a string based on some value that where inputted by the user. I attached this converter to my column using the code below:

DataMemberBinding="{Binding Path=., Converter={StaticResource MyConverter}}"

 

When I debug the code I can see the converter is running for the particular cell and generating a value thats specific for that row, but the cell itself is not updated with the new value, it remains empty?

The user is not able to enter data in this cell or set the focus, because the property IsReadOnly is set and I skip the cell during input, the values the user input are in inputted in a seperate dialog, after this dialog is closed the focus moves automatically to the cell next to it.

Am I forgetting here something to commit, it seems a very simple problem but I cant find it?

Regards,

 

Marcel

 

Marcel
Top achievements
Rank 1
 answered on 11 May 2016
1 answer
155 views

Hey,

is there a reason, why the GroupRenderMode default value is Nested and not Flat? It seems that Nested does not have any advantages, or am I wrong?

 

Thanks a lot!

Stefan
Telerik team
 answered on 10 May 2016
3 answers
119 views

I use group by the  field "Group_name"

the  code like this:

radGridView.Items.GroupDescriptions.Add(new PropertyGroupDescription("Group_name"));

 

when I expanded or unexpanded the group   the first cell in the group is in edit mode;

Is any resulution avoid this ?

Stefan
Telerik team
 answered on 10 May 2016
1 answer
64 views

Hi,

I have a gridview contains 2+ Millions rows and around 5 columns, I want to export the gridview as Excel or PDF document. When call export, I get rowIndex out of bound exception.

Here is the way I used to export as Excel

exportGridView.ExportToXlsx(stream, new GridViewDocumentExportOptions
                                                                                             {
                                                                                                 AutoFitColumnsWidth = true,
                                                                                                 ExportDefaultStyles = true,
                                                                                             });

 

=============================

and this is the way I export as PDF

exportGridView.ExportToPdf(stream, new GridViewPdfExportOptions
                                                                                            {
                                                                                                AutoFitColumnsWidth = true,
                                                                                                ExportDefaultStyles = true,
                                                                                            });

 

Best regards,

Ahmed

Stefan Nenchev
Telerik team
 answered on 10 May 2016
5 answers
193 views

Hello,

 

I'm using a ChartCrosshairBehavior in my RadCartesianChart.

Currently, for the CrossHair Control, the target axis is a left-axis (by default). => picture "one"

 

I want to know if is it possible to target the right axis, and if yes, how can i do this ? (picture "two")

 

This my code :

01.<telerik:ChartCrosshairBehavior x:Name="chartCross" PositionChanged="chartCross_PositionChanged"                                         HorizontalLineLabelVisibility="Hidden"                                                                   HorizontalLineVisibility="Hidden"                                                                        VerticalLineLabelVisibility="Hidden"                                                                     VerticalLineVisibility="Hidden">                                            <telerik:ChartCrosshairBehavior.HorizontalLineLabelDefinition>                                                <telerik:ChartAnnotationLabelDefinition Format="{}{0:N1}" Location="Left" />                                      </telerik:ChartCrosshairBehavior.HorizontalLineLabelDefinition>                            </telerik:ChartCrosshairBehavior>

 

 

Thank you !

 

Valentin.

 

 

Valentin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 10 May 2016
1 answer
663 views

I have added the ImageEditor UI control in My XMAL window and got below error in runtime. i dont have any clue on this issue. i added all libraries based on sample program ; but its not working

OS : Windows 10

IDE: Viusal studio 2015 

Added Reference below Lib: Telerik.Windows.Controls version (2016.1.217.40)

Telerik.Windows.Controls.ImageEditor(2016.1.217.40)

Telerik.Windows.Controls.Navigation

 

Details Error Message:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor" xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"

 

//My XAML code 

<UserControl x:Class="Aagnaa_ImageEditor.ImageProcessngView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Aagnaa_ImageEditor"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:converters="clr-namespace:Aagnaa_ImageEditor.Converters"
            xmlns:views="clr-namespace:Aagnaa_ImageEditor.Views"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="1300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!--<views:CropedImageView Grid.Column="0" x:Name="croppedFinalView"></views:CropedImageView>-->
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="300"></RowDefinition>
            </Grid.RowDefinitions>
            <!--image Editor for Post processing-->
            <telerik:RadImageEditorUI  Margin="8"/>

            <!--Processing Controls-->

        </Grid>
    </Grid>
</UserControl>


             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Aagnaa_ImageEditor"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            xmlns:tools="clr-namespace:Telerik.Windows.Media.Imaging.Tools;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:commands="clr-namespace:Telerik.Windows.Media.Imaging.ImageEditorCommands.RoutedCommands;assembly=Telerik.Windows.Controls.ImageEditor"
            xmlns:converters="clr-namespace:Aagnaa_ImageEditor.Converters"
            xmlns:views="clr-namespace:Aagnaa_ImageEditor.Views"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="1300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <!--<views:CropedImageView Grid.Column="0" x:Name="croppedFinalView"></views:CropedImageView>-->
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="300"></RowDefinition>
            </Grid.RowDefinitions>
            <!--image Editor for Post processing-->
            <telerik:RadImageEditorUI  Margin="8"/>

            <!--Processing Controls-->

        </Grid>
    </Grid>
</UserControl>

 

 

Let me know if its common issue?

 

Regards

Hema

Masha
Telerik team
 answered on 10 May 2016
1 answer
80 views

i am using RadGridView to display data. in the UI design, I also apply AggregateFunctions for some columns (see below). But when I drag one column for grouping, the Aggregate result also show in the grid which looked not good. Any way to prevent when I manually drag columns for grouping?

 <telerik:GridViewDataColumn.AggregateFunctions>
                        <telerik:SumFunction ResultFormatString="{}{0:N4}"/>
                    </telerik:GridViewDataColumn.AggregateFunctions>

Yoan
Telerik team
 answered on 10 May 2016
2 answers
117 views

I'm having this weird issue with the RadChartView when I try to use label rotation to try to improve label legibility, but it seems like a lot of space is being wasted. I'm only adding the following code:

axisX.LabelTemplate = (DataTemplate)Resources["tinyTemplate"];
// The following lines are commented to achieve the noRotation.png image
axisX.LabelRotationAngle = -45;
axisX.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate;


<DataTemplate x:Key="tinyTemplate">
   <TextBlock FontSize="7pt"  Text="{Binding}" />
</DataTemplate>


axisX.LabelTemplate = (DataTemplate)Resources["tinyTemplate"];
axisX.LabelRotationAngle = -45;
axisX.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate;
Fabrice
Top achievements
Rank 1
 answered on 09 May 2016
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?