Telerik Forums
UI for WPF Forum
1 answer
452 views
We are currently migrating a legacy system to .NET and part of my task is to design a UI framework that is able to integrate into our existing structure with as little friction as possible. For this purpose, I have written small wrapper controls that offer the interface we need, internally use Telerik controls, and translate as necessary between both.

One of the requirements is that, after selecting a dropdown item, the ComboBox itself does not decide which data to display in its TextBox. Rather, a different object will be informed about which index was selected and will set the desired text for the RadComboBox (and may also do various other things, dependent on the ComboBox and the selected index). As things currently are, the RadComboBox will automatically fill its TextBox with the result of a .ToString() of the selected dropdown item/business object. Almost immediately afterwards, our "deciding" object will overwrite the text with the desired value. This produces an unwanted flickering.

I did not find any way of telling an editable RadComboBox to stop setting its own text. I have tried setting the TextSearch.TextPath Property to an invalid value, which kind of looks better (it sets an empty string as the text, which looks more like a delay than flickering), but it triggers an ArgumentException (that is automatically swallowed), which is ugly, and comes with a noticeable delay. I have also tried handling various events (such as SelectionChanged, or the routed TextBoxBase.TextChanged Event) and setting the Handled Property of the EventArgs when we want to stop this event - but that was consequently ignored by the RadComboBox.

A similar problem was the automatic overwriting of the TextBox text when navigating the dropdown with the keyboard; Setting the CanKeyboardNavigationSelectItems property to false was the solution to that. Is a similar solution available to the problem described above, or is the setting-text-to-TextBox-on-selection baked in so much that it would be better for us to look for alternative ideas?
Nasko
Telerik team
 answered on 11 May 2016
1 answer
159 views
If you add a new record and then run a command or method RejectChanges the commands or methods do not work SubmitChanges RejectChanges.
Dilyan Traykov
Telerik team
 answered on 11 May 2016
2 answers
190 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
127 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
198 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
186 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
128 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
80 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
255 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
720 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
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?