Telerik Forums
UI for WPF Forum
6 answers
334 views

I have a RadCartesianChart with one ScatterPointSeries when the number of points is 20000 the time to plot is 40 seconds.

The class where stored values:

public class ChartDataFlatness
{
    public double XValue { get; set; }
    public double YValue { get; set; }
    public Brush Brush { get; set; }
}

The class used to pass value to RadCartesianChart

class ViewModelFlatness : ViewModelBase
{
    private List<ChartDataFlatness> data;
    public ViewModelFlatness() { }
    public List<ChartDataFlatness> Data {
        get { return this.data; }
        set {
            if (this.data != value) {
                this.data = value;
                this.OnPropertyChanged("Data");
            }
        }
    }
}

The user control used for show the data:

<UserControl x:Class="TiQ.Qua.Tna.Quality.Station.UserControls.UserControlChartFlatnessQualityStation"
             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"
             xmlns:classes="clr-namespace:TiQ.Qua.Tna.Quality.Station.Classes"
             mc:Ignorable="d" RenderTransformOrigin="0,0" HorizontalAlignment="Left" VerticalAlignment="Top">
    <Grid>
        <telerik:RadCartesianChart x:Name="RadChartFlatness" LayoutUpdated="RadChartFlatness_LayoutUpdated" >
            <telerik:ScatterPointSeries XValueBinding="XValue" YValueBinding="YValue"  >
                <telerik:ScatterPointSeries.PointTemplate>
                    <DataTemplate>
                        <Rectangle Width="10" Height="10" Fill="{Binding DataItem.Brush}"/>
                    </DataTemplate>
                </telerik:ScatterPointSeries.PointTemplate>
            </telerik:ScatterPointSeries>
            <telerik:RadCartesianChart.HorizontalAxis><telerik:LinearAxis VerticalLocation="Top" /></telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis><telerik:LinearAxis IsInverse="True" /></telerik:RadCartesianChart.VerticalAxis>
        </telerik:RadCartesianChart>
    </Grid>
</UserControl>

The code used to set data for RadGraph:

ViewModelFlatness _viewModel = new ViewModelFlatness { };
// Set Data of _viewModel
RadChartFlatness.Series[0].ItemsSource = _viewModel.Data;

It is possibile to reduce the time to plot data to 2/5 seconds.

Greetings,

Paolo​

Sam
Top achievements
Rank 1
 answered on 02 Sep 2016
6 answers
420 views

The issues we can reproduce with the latest version 2016.2.822.40

 

Issues #1 and #2.
How to reproduce on the test project:
Run the application.
Click the «Create new QCV with group descriptor» button.

See pic. 1

We see two issues:
1. Groups inside the table are doubled. Group descriptors collection contains two group descriptors (of the same type: GroupDescriptor), but only one is shown in «Grouped by» section.
2. Grid itself does not notify when its GroupDescriptors collection has been changed, though QueryableCollectionView bound to this Grid notifies of its GroupDescriptors collection successfully.

Issue #3
How to reproduce on the test project:
Start the application.
Delete the «Profession» group descriptor (click on X in «Groupped by»).
Group by the «Profession» group manually (drag-and-drop column header onto «Grouped by»).
Click the «Create new QCV with group descriptor» button.

See pic. 2.

We see now, that group descriptors were doubled. In the GroupDescriptors collection of Grid there are two descriptors of two different types: ColumnGroupDescriptor and GroupDescriptor. And it seems impossible to programmatically add a descriptor of type «ColumnGroupDescriptor» in the viewmodel, because it should know about the UI (it needs column data), and hence is against the principles of MVVM.

Furthermore, if you now click the «Create new QCV with group descriptor» button again, you will see that groups are tripled:

See pic. 3




Dilyan Traykov
Telerik team
 answered on 02 Sep 2016
1 answer
93 views

Hi,

I have a radGridView and a RadDataPager. The source of RadDataPager.Source is bound to RadGridView.items. Adding items in grid automatically increases number of pages.

Is there any event available that can intimate me if number of pages are increased in data pager? Actually I want to call dataPager.MoveToLastPage(); if items are added in grid.

Thanks in Advance.

Stefan
Telerik team
 answered on 01 Sep 2016
5 answers
104 views
Hi Team !!

I want to know what my DataFormatString should be if i want to display numbers in the Indian Culture :

100
1,000
10,000
1,00,000
10,00,000
1,23,45,678
Dilyan Traykov
Telerik team
 answered on 01 Sep 2016
2 answers
1.7K+ views

Hi, I have a RadGridView with a column having a checkbox inside that I should use to activate or deactivate the user. I retrieve the rows of my radgridview from a query in sqlserver. The problem is with the checkbox column: I can't get the checkbox checked based on the value in my sql column (bit). This is how I retrive the rows:

Dim dt As New DataTable
 
        Using sqlCon = New SqlConnection(ConnectionStringRemote)
            sqlCon.Open()
 
            Dim cmd = New SqlCommand("", sqlCon)
            cmd.CommandText = "SELECT        MA_Carriers.Carrier, MA_Carriers.CompanyName, ISNULL(STRT_CarriersManager.Activated,0) AS Attivo
FROM            STRT_CarriersManager RIGHT OUTER JOIN
MA_Carriers ON STRT_CarriersManager.Carrier = MA_Carriers.Carrier WHERE MA_Carriers.Disabled=0"
            Dim sda = New SqlDataAdapter(cmd)
 
            sda.Fill(dt)
            gridCarriers.ItemsSource = dt
 
        End Using

 

And this is the XAML:

<UserControl x:Class="CarriersManager"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:Dalessio_Logistics"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d"
             d:DesignHeight="500" d:DesignWidth="1100" Background="White">
     
    <UserControl.Resources>
        <local:BoolConverter x:Key="BoolConverter" />
    </UserControl.Resources>
 
    <StackPanel Margin="0,0,0,0" Height="auto" HorizontalAlignment="Stretch">
            <StackPanel x:Name="panelTitle" Height="50" VerticalAlignment="Top" DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Stretch">
                <telerik:Label Content="Gestione operatori:"/>
            </StackPanel>
            <StackPanel x:Name="spContent">
            <telerik:RadGridView x:Name="gridCarriers"  AutoGenerateColumns="False" CanUserInsertRows="False" CanUserDeleteRows="False" RowIndicatorVisibility="Collapsed"
            ShowGroupPanel="False" IsReadOnly="False" Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" SelectionMode="Extended" SelectionUnit="FullRow"
            CanUserReorderColumns="False" FontFamily="Source Sans Pro Semibold" FontSize="14" GridLinesVisibility="Horizontal" IsFilteringAllowed="True" ShowSearchPanel="True" RowHeight="45">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn x:Name="Carrier" UniqueName="Carrier" Header="Carrier" IsReadOnly="True" Width="150" DataMemberBinding="{Binding Carrier}"/>
                    <telerik:GridViewDataColumn x:Name="CompanyName" Header="CompanyName" IsReadOnly="True" DataMemberBinding="{Binding CompanyName}" Width="*"/>
                    <telerik:GridViewColumn Header="Attivo">
                        <telerik:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <CheckBox IsChecked="{Binding Path=Attivo, Converter={StaticResource BoolConverter}}" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked"/>
                            </DataTemplate>
                        </telerik:GridViewColumn.CellTemplate>
                    </telerik:GridViewColumn>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </StackPanel>
        </StackPanel>
</UserControl>

And this is the BoolConverter : IValueConverter 

Public Class BoolConverter
    Implements IValueConverter
#Region "IValueConverter Members"
    Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
        If targetType <> GetType(Boolean) Then
            Throw New InvalidOperationException("The target must be a boolean")
        End If
 
        Return CBool(value)
    End Function
 
    Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
        Throw New NotSupportedException()
    End Function
#End Region
End Class

 

It doesn't work, my CheckBoxes are always unchecked. Can sameone help me please?

 

Thank you

 

 

 

Start Informatica
Top achievements
Rank 1
 answered on 01 Sep 2016
2 answers
145 views

Hi, I have a problem with my gridview, I don't know why Binding works in some columns but not in other. This is my xaml:

<UserControl x:Class="CarriersManager"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:Dalessio_Logistics"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d"
             d:DesignHeight="500" d:DesignWidth="1100" Background="White">
 
    <StackPanel Margin="0,0,0,0" Height="auto" HorizontalAlignment="Stretch">
            <StackPanel x:Name="panelTitle" Height="50" VerticalAlignment="Top" DockPanel.Dock="Top" Orientation="Horizontal" HorizontalAlignment="Stretch">
                <telerik:Label Content="Gestione operatori:"/>
            </StackPanel>
            <StackPanel x:Name="spContent">
            <telerik:RadGridView x:Name="gridCarriers"  AutoGenerateColumns="False" CanUserInsertRows="False" CanUserDeleteRows="False" RowIndicatorVisibility="Collapsed" IsFilteringAllowed="True"
            ShowGroupPanel="False" IsReadOnly="False" Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" SelectionMode="Single"
            CanUserReorderColumns="False" FontFamily="Source Sans Pro Semibold" FontSize="14" GridLinesVisibility="Horizontal" RowHeight="45">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn x:Name="Carrier" UniqueName="Carrier" Header="Carrier" IsReadOnly="True" Width="150" DataMemberBinding="{Binding Carrier}"/>
                    <telerik:GridViewDataColumn x:Name="CompanyName" Header="CompanyName" IsReadOnly="True" DataMemberBinding="{Binding CompanyName}" Width="*"/>
                    <telerik:GridViewCheckBoxColumn Header="Attivo" Width="100" DataMemberBinding="{Binding Attivo}" IsReadOnly="True"/>
                    <telerik:GridViewColumn Header="Attiva" Width="80">
                        <telerik:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <telerik:RadButton  x:Name="btPiù" CommandParameter="{Binding Carrier}" Content="+" Click="btPiù_Click" TouchDown="btPiù_Click"  Background="#FF97DA7E" />
                            </DataTemplate>
                        </telerik:GridViewColumn.CellTemplate>
                    </telerik:GridViewColumn>
                    <telerik:GridViewColumn Header="Disattiva" Width="80">
                        <telerik:GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <telerik:RadButton  x:Name="btMeno" CommandParameter="{Binding Carrier}" Content="{Binding Carrier}" Click="btMeno_Click" TouchDown="btMeno_Click" Background="#FFEC6F6F"/>
                            </DataTemplate>
                        </telerik:GridViewColumn.CellTemplate>
                    </telerik:GridViewColumn>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
        </StackPanel>
        </StackPanel>
</UserControl>

 

this is my vb:

Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
        Dim dt As New DataTable
 
        Using sqlCon = New SqlConnection(ConnectionStringRemote)
            sqlCon.Open()
 
            Dim cmd = New SqlCommand("", sqlCon)
            cmd.CommandText = "SELECT MA_Carriers.Carrier, MA_Carriers.CompanyName, ISNULL(STRT_CarriersManager.Activated,0) AS Attivo
FROM            STRT_CarriersManager RIGHT OUTER JOIN
MA_Carriers ON STRT_CarriersManager.Carrier = MA_Carriers.Carrier WHERE MA_Carriers.Disabled=0"
            Dim sda = New SqlDataAdapter(cmd)
 
            sda.Fill(dt)
            gridCarriers.ItemsSource = dt
        End Using
    End Sub

 

And this is the result:

http://prntscr.com/cbrdtd

As you can see the content of the green button is empy, and also the commandparameter is empty when I try to retrieve it. Can you help me please? 

 

Thank you

 

Start Informatica
Top achievements
Rank 1
 answered on 01 Sep 2016
1 answer
102 views

I have the following checkbox:

<telerik:GridViewDataColumn>

    <telerik:GridViewDataColumn.CellTemplate>
          <DataTemplate>
               <CheckBox  x:Name="chck_tipoR" IsChecked="{Binding Liquidar, Mode=TwoWay}"   Click="chck_tipoR_Click"/>
          </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

 

the "Liquidar" variable is my base data type bool that makes the checkbox to appear selected or not, I want to make the checkbox that will click and not checked activate depending on a condition, the condition is that by giving click the checkbox a login screen where the user and password introduce me appears and when it has been satisfying my checkbox is activated.

I'm ultizando the click event for this action but in the method click the checbox in code behind not like having only the checkbox that I clicked activated, not as referrers the checkbox that I clicked and this is activated .

Please can support me with this

here is my metod:

private void chck_tipoR_Click(object sender, RoutedEventArgs e)
        {
            
            DialogoConfirmacionCobrar midialog = new DialogoConfirmacionCobrar();
            midialog.ShowDialog();

        }

Dilyan Traykov
Telerik team
 answered on 01 Sep 2016
1 answer
2.6K+ views
I have a Telerik RadCombobox where I need to react to the change of selected item and store the selected value.
telerik:RadComboBox ItemsSource="{Binding CurrencyList}"<br>  DisplayMemberPath="Currency"<br>  SelectedValuePath="CurrencyID"<br>  SelectedValue="{Binding SelectedIssuance.IssuanceCurrencyID, Mode=TwoWay}"<br>  IsSynchronizedWithCurrentItem="True"<br>  SelectedItem="{Binding SelectedCurrency,Mode=OneWayToSource}"


This works the first time I access the view, however subsequent accesses on the same or another record the displayed value is always the first record in the CurrencyList

Any suggestions on how to fix this issue?

One idea is to get the changed value in the VM from the Model by subscribing to the OPC event and remove the SelectedItem binding. 
Kalin
Telerik team
 answered on 01 Sep 2016
1 answer
147 views

Hello,

 

is it possible to do just a horizontal slide (no zoom) of some Images like on this homepage 

http://www.volkswagen-motorsport.com/index.php?id=321 

Best,

Steffen

 

Yana
Telerik team
 answered on 01 Sep 2016
1 answer
114 views

I am binding my RadGridView to a VirtualQueryableCollectionView, everything is working fine except the filters. What could be the reason that the filters are not working ?

Where should I look for the Error ?

 

 

 

Stefan
Telerik team
 answered on 31 Aug 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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?