Telerik Forums
UI for WPF Forum
1 answer
380 views

Hello,

I want to display multiple scatter line series dynamically from View Model. Right now, I am displaying succesfully using the below code but my requirement is not to use ScatterLineSeries multiple times and give it from View Model. I tried series provider but it is not giving anything. Is there any example for this ?

I don't know how many scatterlineseries I need and it is dynamic. How can I do this ?

 

<telerik:RadCartesianChart x:Name="Chart">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis Maximum="{Binding Max}" Minimum="0" Title="Generation" TickThickness="0">
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.HorizontalAxis>

            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis Maximum="{Binding QMax}"  Minimum="{Binding QMin}" Title="Q (Max/Min)" TickThickness="0">
                </telerik:LinearAxis>
            </telerik:RadCartesianChart.VerticalAxis>

            <telerik:RadCartesianChart.Annotations>
                <telerik:CartesianGridLineAnnotation Axis="{Binding VerticalAxis, ElementName=DCurverChart}" Value="0" ></telerik:CartesianGridLineAnnotation>
            </telerik:RadCartesianChart.Annotations>

            <telerik:RadCartesianChart.Series>
                <telerik:ScatterLineSeries ItemsSource="{Binding MaxDummyDataPoints}" XValueBinding="XValue" YValueBinding="YValue" Stroke="SaddleBrown">
                    <telerik:ScatterLineSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Fill="Red" Width="5" Height="5" />
                        </DataTemplate>
                    </telerik:ScatterLineSeries.PointTemplate>
                </telerik:ScatterLineSeries>
                <telerik:ScatterLineSeries ItemsSource="{Binding MinDummyDataPoints}" XValueBinding="XValue" YValueBinding="YValue" Stroke="SaddleBrown" >
                    <telerik:ScatterLineSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Fill="Red" Width="5" Height="5" />
                        </DataTemplate>
                    </telerik:ScatterLineSeries.PointTemplate>
                </telerik:ScatterLineSeries>
                <telerik:ScatterLineSeries ItemsSource="{Binding DataPoints}" XValueBinding="XValue" YValueBinding="YValue">
                    <telerik:ScatterLineSeries.PointTemplate>
                        <DataTemplate>
                            <Ellipse Fill="Red" Width="5" Height="5" />
                        </DataTemplate>
                    </telerik:ScatterLineSeries.PointTemplate>
                </telerik:ScatterLineSeries>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>

Martin Ivanov
Telerik team
 answered on 12 May 2016
1 answer
106 views

Hi, Everytime a new appointment is added, I would like to send it off to my outlook. I have the code to send it to outlook, but I'm looking to trigger it upon new appointment has been completed.

May I ask how do I set an event to fire after 'OK' is clicked. Or what is the best method to save the new appointments. 

 

 

Yana
Telerik team
 answered on 12 May 2016
1 answer
118 views

Hello,

Is it possible to dynamically change the FontSize of Office2013 Theme (as it's written in the documentation) ? I'm able to dynamically change the fontSize with VisualStudio2013 Theme, but not with Office2013...

Thank you

Leon

Martin
Telerik team
 answered on 11 May 2016
1 answer
448 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
155 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
185 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
124 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
193 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
181 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
126 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
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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?