Telerik Forums
UI for WPF Forum
1 answer
235 views
Hi!

I'm using Telerik controls for WPF version Q1 2013 (have not been able to get latest licensed version yet... hopefully we get that soon).

I have a problem with setting TileView's RowsCount and ColumnsCount to certain value and then resizing the window. Looks like tiles are cropped from their right side if window width gets smaller and from bottom if window height gets smaller. Is there a way to prevent this?

Here's a screenshot with TileView's column count set to 4. I only have one tile in this example and tile's right side is cropped long before window size reaches the tile... And If I set column count to 6 the tile is cropped even sooner.

Column count 4 example #1

Column count 4 example #2

It is ok for the tile to be cropped like this but only if the width of the window reaches the tile. I hope you understand what I mean by this.

Br,

Kalle
Zarko
Telerik team
 answered on 14 Nov 2013
1 answer
259 views
I'm having a problem where my PointTemplate is getting clipped for a ScatterPointSeries. It appears to be working correctly for a BarSeries styled as points, but when I use the same template for ScatterPointSeries it appears to be clipping negative drawn values. This example shows the problem:

<Window x:Class="PointTemplate.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <ResourceDictionary>
            <DataTemplate x:Key="CircleTemplate">
                <Ellipse Width="8" Height="8" VerticalAlignment="Center" Fill="Black" />
            </DataTemplate>
            <DataTemplate x:Key="XTemplate">
                <Path Stroke="Black" Data="M -4,-4 L 4,4 M 4,-4 L -4,4"/>
                <!-- This shows the whole X, but X doesn't mark the spot! -->
                <!-- <Path Stroke="Black" Data="M 0,0 L 8,8 M 8,0 L 0,8"/> -->
            </DataTemplate>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>
        <telerik:RadCartesianChart x:Name="TimeChart" Grid.Row="0">
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
            </telerik:RadCartesianChart.Grid>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis LabelFitMode="Rotate" LabelFormat="MMM-yy" />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:BarSeries PointTemplate="{StaticResource XTemplate}"
                                   ItemsSource="{Binding Data}" CategoryBinding="Date" ValueBinding="YValue" />
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
 
        <telerik:RadCartesianChart x:Name="ScatterChart" Grid.Row="1">
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
            </telerik:RadCartesianChart.Grid>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:ScatterPointSeries PointTemplate="{StaticResource XTemplate}"
                                            ItemsSource="{Binding Data}" XValueBinding="XValue" YValueBinding="YValue" />
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
    </Grid>
</Window>

Note that the top chart shows the X markers correctly, whereas the bottom, which is using the same template, is clipped. In this example if you use the CircleTemplate both show correctly, however in my real project it again shows correctly on the BarSeries chart, but gets clipped on the Scatter chart. In this case, if the VerticalAlignment is set to Top, it shows the top left quarter of the circle, and if it's set to center, it shows a square smaller than the circle.

Is there a way to expand the size of what the markers are allowed to fill for scatter series?

For completeness, here's my code-behind for this example:
using System;
using System.Windows;
using System.Collections.ObjectModel;
 
namespace PointTemplate
{
    public class DataPoint
    {
        public DateTime Date { get; set; }
        public double YValue { get; set; }
        public double XValue { get; set; }
    }
    public partial class MainWindow : Window
    {
        public Collection<DataPoint> Data { get; set; }
        public MainWindow()
        {
            InitializeComponent();
            Data = new Collection<DataPoint>();
            Data.Add(new DataPoint() { Date = new DateTime(2013, 1, 1), XValue = 10, YValue = 20 });
            Data.Add(new DataPoint() { Date = new DateTime(2013, 2, 1), XValue = 20, YValue = 20 });
            Data.Add(new DataPoint() { Date = new DateTime(2013, 3, 1), XValue = 30, YValue = 40 });
            Data.Add(new DataPoint() { Date = new DateTime(2013, 4, 1), XValue = 40, YValue = 35 });
            Data.Add(new DataPoint() { Date = new DateTime(2013, 5, 1), XValue = 50, YValue = 40 });
            Data.Add(new DataPoint() { Date = new DateTime(2013, 6, 1), XValue = 60, YValue = 30 });
            Data.Add(new DataPoint() { Date = new DateTime(2013, 7, 1), XValue = 70, YValue = 50 });
            this.DataContext = this;
        }
    }
}

Thanks,
Louis

Petar Marchev
Telerik team
 answered on 14 Nov 2013
1 answer
194 views
Hi,

Please see the three bolded StaticResource elements that are unresolved.  I just updated to the latest version  of the Telerik comtrols and updated the references.  Can you please tell me what i need to do to correct this.This was working before the upgrade. If you can expedite this I would greatly appreciate it,  I am dead in the water.

Thanks
Rich

<telerik:RadWindow x:Class="QueryManager.RadMessageBox"
                   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:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                   Style="{StaticResource RadWindowStyle}"
                   ResizeMode="NoResize"
                   IsTabStop="False"
                   MaxWidth="500"
                   WindowStartupLocation="CenterScreen"
                   MinWidth="275"
                   mc:Ignorable="d"
                   d:DesignHeight="500" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" FocusManager.FocusedElement="{Binding ElementName=OK}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.InputBindings>
            <KeyBinding Key="Escape" Command="{x:Static telerik:WindowCommands.Confirm}"/>
        </Grid.InputBindings>
        <ContentPresenter x:Name="Icon" VerticalAlignment="Top" Margin="16 8 8 8" ContentTemplate="{StaticResource ConfirmIconTemplate}"/>
        <ScrollViewer IsTabStop="False" Grid.Row="0" Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0 0 0 8">
            <TextBlock Name="Message" Text="Custom RadWindow as Alert window." VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"/>
        </ScrollViewer>
        <Border x:Name="HorizontalRule" Grid.Row="1" Grid.ColumnSpan="4" BorderThickness="0 0 0 1" Height="2" Background="{StaticResource BorderLineOuterColor}" BorderBrush="{StaticResource BorderLineInnerColor}" VerticalAlignment="Top"/>
        <telerik:RadButton x:Name="Yes" Click="YesButtonClick" Grid.Row="2" Grid.Column="1" MinWidth="60" IsTabStop="True" TabIndex="0" HorizontalAlignment="Right" Content="Yes" Margin="0 10 8 8" />
        <telerik:RadButton x:Name="No" Click="NoButtonClick" Grid.Row="2" Grid.Column="2" MinWidth="60" IsTabStop="True" TabIndex="0" HorizontalAlignment="Right" Content="No" Margin="0 10 8 8" />
        <telerik:RadButton x:Name="Cancel" Click="CancelButtonClick" telerik:RadWindow.ResponseButton="Cancel" telerik:LocalizationManager.ResourceKey="Cancel" Grid.Row="2" Grid.Column="3" MinWidth="60" IsTabStop="True" TabIndex="0" HorizontalAlignment="Right" Margin="0 10 8 8" />
    </Grid>
</telerik:RadWindow>
Yana
Telerik team
 answered on 14 Nov 2013
4 answers
420 views
hi, 

how do I change the width of the Radcombobox dropdown vertical scrollbar? I don't have Blend as well.

thanks in advance,

Paul
Masha
Telerik team
 answered on 14 Nov 2013
1 answer
76 views


Hi All,

Is it possible to disable the content region for the outlook bar item when selected?There is a scenario where for few outlook bar items need to display the content o content region when selected and for the other outlook bar items content region and header should not be displayed when selected.

How does it work?

Thanks and Regards,
Ramya
Kiril Vandov
Telerik team
 answered on 13 Nov 2013
0 answers
169 views
I have updated the Reporting controls and the WPF control to the most recent  .1016  when I add a reportviewer control to the screen it no longer shows using the Theme that I set in the MainNav.xaml.cs file.  Then when I go to the grid control itself and from the property window select style I only see Default as the available theme.
Eric Klein
Top achievements
Rank 1
 asked on 13 Nov 2013
2 answers
162 views
I have a RadDataForm that's using a custom DataFormCommandProvider - pretty much lifted from the documentation.  However, as soon as I assign my custom provider to the "CommandProvider" property to the RadDataForm, the VS designer places an error panel over the top of my rendered control with the following message:

"An object of the type "TruNest.Client.CustomCommandProvider" cannot be applied to a property that expects the type "Telerik.Windows.Controls.ICommandProvider".

The project builds and runs fine, and the custom command provider works as expected.  However, the designer definitely has problems with it for some reason.  Here is a XAML code (snippet) for the RadDataForm:

   <UserControl.Resources>
       <local:CustomCommandProvider x:Key="CustomProvider" />
   </UserControl.Resources>
       
<telerik:RadDataForm x:Name="dataForm"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            AutoGeneratingField="dataForm_AutoGeneratingField"
                            CommandButtonsVisibility="All"
                            CommandProvider="{StaticResource CustomProvider}"
                            EditEnded="dataForm_EditEnded"
                            IsEnabled="{Binding IsEnabled}"
                            ItemsSource="{Binding TableData}" />

And the source for the CustomCommandProvider class (again, pretty much straight from the docs):

using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Data.DataForm;
 
namespace TruNest.Client
{
    public class CustomCommandProvider : DataFormCommandProvider
    {
        public CustomCommandProvider()
            : base(null)
        {
        }
 
        public CustomCommandProvider(RadDataForm dataForm)
            : base(dataForm)
        {
            this.DataForm = dataForm;
        }
 
        protected override void CommitEdit()
        {
            bool? dialogResult = null;
            RadWindow.Confirm(new DialogParameters()
            {
                Header = "Confirm",
                Content = "Commit all changes?",
                Closed = (confirmDialog, eventArgs) =>
                {
                    dialogResult = eventArgs.DialogResult;
                }
            });
 
            if ((bool)dialogResult)
            {
                this.DataForm.CommitEdit();
            }
        }
 
        protected override void CancelEdit()
        {
            bool? dialogResult = null;
            RadWindow.Confirm(new DialogParameters()
            {
                Header = "Confirm",
                Content = "Cancel all changes?",
                Closed = (confirmDialog, eventArgs) =>
                {
                    dialogResult = eventArgs.DialogResult;
                }
            });
 
            if ((bool)dialogResult)
            {
                this.DataForm.CancelEdit();
            }
        }
 
        protected override bool CanDeleteExecute()
        {
            return false;
        }
 
        protected override bool CanAddNewExecute()
        {
            return false;
        }
    }
}

How can I eliminate the VS designer error so I can *see* my control instead of the error message?

Jeff
Yoan
Telerik team
 answered on 13 Nov 2013
0 answers
166 views
Hi,

I have a RadGridView binded to a DataSet which contains many DataTables. I have also defined a GridViewSelectColumn to let the displayed rows Selectable. But when i navigate to another screen then return, i lose the selection in the grid. This may be caused by the refresh of the grid data. I want to let selection stay until i destroy the screen instance.

Here's my code :

   
<telerik:RadGridView  CanUserSelect="False" RowLoaded="radGridSuccessRows_RowLoaded" IsFilteringAllowed="True"
                                     ShowGroupPanel="False" Name="radGridSuccessRows"  AutoGenerateColumns="True"
                                     RowIndicatorVisibility="Collapsed" AutoGeneratingColumn="OnAutoGeneratingColumn"
                                     ItemsSource="{Model.ValidationDataSet,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                     EnableColumnVirtualization="True" EnableRowVirtualization="True"
                                     SelectionChanged="RadGridSuccessRows_OnSelectionChanged" DataLoadMode="Asynchronous" >
     <telerik:RadGridView.Columns>
                    <telerik:GridViewSelectColumn/>
     </telerik:RadGridView.Columns>
  </telerik:RadGridView>



Yel
Top achievements
Rank 1
 asked on 13 Nov 2013
4 answers
432 views
Hello, my problem is that, I have RadGridView with 2 non readonly columns. When Im trying to edit row, and accept with 'enter', in first row selection is changed to second row, but doesn't from second to next etc. What I'd like to reach - after commit in RowEditEnded -> select next row if there is one (at this momment after editing first, as I said, going into edit mode in second, but stays here with cell edit).
Code:
      
  void myDG_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
        {
          
if (e.EditAction == Telerik.Windows.Controls.GridView.GridViewEditAction.Commit)
           {
                editInDatabase(e.NewData);
           }
        }


        void editInDatabase(object o)
        {
            myType np = (myType)o;
           
using (SqlConnection conn = new SqlConnection(cString.c_String))
            {
//edit row in database            
            }
        }

Paweł
Top achievements
Rank 1
 answered on 13 Nov 2013
1 answer
140 views
Hi, I using an editable GridViewDataColumn and have troubles on the Edit behavior..

1. When I change the value in a cell for the first time, it works fine. However, when I try to edit the cell again, an editable TextBox is enabled alright but the value won't change. When I try it for the third time, it again works fine.
2. After editing a cell, the edited cell loses focus and the selected item of RadGridView is set to an irrelevant item.
3. I'm using a MessageBox in the CellValidating event and the event is fired twice. How can I handle this in C#?


Please help me!
Vera
Telerik team
 answered on 13 Nov 2013
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?