Telerik Forums
UI for WPF Forum
3 answers
366 views
Hi,

I want to display dynamic data with a dynamic count of series.

There is already a, in my opinion, very straight forward solution for this in a RadChart (only difference is that I'm doing it with a StackedBarSeries, but it works as well).

[quote]Luis said:Hello,

I have a data structure like this:
Year - Team - Value
2010 - T1 - 50
2010 - T2 - 70
2009 - T1 - 40
2009 - T2 - 45
...

Years and teams can growing dinamically. I need a Bar Chart where:
- One data serie for each team
- Years in the axis X
- One bar for each serie in each year with the value as height

I've seen the "Data Binding with Automatic Series Mappings" sample, but it's not what i need.

Please, help me.
Thanks a lot.
[/quote]

<telerik:RadChart x:Name="RadChart1" >
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping>
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:StackedBarSeriesDefinition />
            </telerik:SeriesMapping.SeriesDefinition>
            <telerik:SeriesMapping.GroupingSettings>
                <telerik:GroupingSettings ShouldCreateSeriesForLastGroup="True">
                    <telerik:GroupingSettings.GroupDescriptors>
                        <telerik:ChartGroupDescriptor Member="Team"/>
                    </telerik:GroupingSettings.GroupDescriptors>
                </telerik:GroupingSettings>
            </telerik:SeriesMapping.GroupingSettings>
            <telerik:SeriesMapping.ItemMappings>
                <telerik:ItemMapping FieldName="Value" DataPointMember="YValue" />
                <telerik:ItemMapping FieldName="Year" DataPointMember="XCategory" />
            </telerik:SeriesMapping.ItemMappings>
        </telerik:SeriesMapping>
    </telerik:RadChart.SeriesMappings>
</telerik:RadChart>

public partial class Example2 : UserControl
{
    public Example2()
    {
        InitializeComponent();
 
        List<Record> data = new List<Record>()
            {
                new Record(2009, "First team", 25),
                new Record(2010, "First team", 35),
                new Record(2011, "First team", 45),
                new Record(2009, "Second team", 15),
                new Record(2010, "Second team", 25),
                new Record(2011, "Second team", 75),
                new Record(2009, "Third team", 67),
                new Record(2010, "Third team", 20),
                new Record(2011, "Third team", 88),
                new Record(2009, "Fourth team", 34),
                new Record(2010, "Fourth team", 67),
                new Record(2011, "Fourth team", 91),
                new Record(2009, "Fifth team", 87),
                new Record(2010, "Fifth team", 77),
                new Record(2011, "Fifth team", 12)
            };
 
        this.RadChart1.ItemsSource = data;
    }
}
 
public class Record
{
    public Record(int year, string team, int value)
    {
        Year = year;
        Team = team;
        Value = value;
    }
 
    public int Value { get; set; }
    public string Team { get; set; }
    public int Year { get; set; }
}

Is it possible to do the same thing like in the link with a RadCartesianChart? Or should I stick with the RadChart?
Martin Ivanov
Telerik team
 answered on 29 Jan 2014
2 answers
336 views
Hi,

I'm using the version Q3 2013 SP1 (2013.3.1204.40).
Is it possible to make the watermark text, e.g. "Type a name" in the attached picture, right alignment?
Thanks.

Regards,
Gong
Vadimir
Top achievements
Rank 1
 answered on 29 Jan 2014
1 answer
130 views
Hi,

    I am working on a Xbap application with the PersistenceFramwork (the latest version of WPF controls). It all work fine when I have only single xbap page, but if i have multiple pages in same application, it fails.

    After I assigned different page to the "Mainwindow.Content" and try to find those settings that I stored in previous page, it always return 0. But if I go back to previous page, I do get those settings.

    How can I retrieve those settings in different pages?

Code that I used:

  Dim m_isoStorageProvider As New Telerik.Windows.Persistence.Storage.IsolatedStorageProvider()
        Dim arrStorageFiles As New List(Of String)
        arrStorageFiles.Add("GridView1")
        arrStorageFiles.Add("GridView2")
        m_isoStorageProvider.LoadFromStorage(arrStorageFiles.ToArray)


Thanks
Chris

Zarko
Telerik team
 answered on 29 Jan 2014
1 answer
74 views
I have a DataForm with various DataFormComboboxFields. I'm using autogeneration to populate the DataForm.

How can I change the appearance of RadComboBoxes in the DataFormComboBoxFields at runtime?

I want to be able to show or hide the SelectionButton that appears inside the ComboBoxes (Property ClearSelectionButtonVisibility  of RadComboBox). Some DataFormComboBoxFields should show this button, others not...

 
Yoan
Telerik team
 answered on 29 Jan 2014
6 answers
91 views
Hi Team,

I have a cell template with 2 buttons placed inside it. I am using Telerik assemblies from Binaries.Noxaml version. CUIT is not able to identify the buttons placed inside the cell at runtime.

Can anyone suggest how to fox this issue?

Regards,
Sirisha
Yordanka
Telerik team
 answered on 29 Jan 2014
4 answers
340 views
Hi Team,
I have RadTabItem with ContentControl inside it. Coded UI Test is not able to identify the controls placed inside. I am referencing the telerik assemblies from Binaries.NoXaml folder under 4.5 version.

Can anyone help in resolving it?

Following is the Xaml template: 
<telerik:RadTabControl Name="MainTabControl" Visibility="Visible" TabStripPlacement="Left" SelectionChanged="MainTabControl_SelectionChanged">
           <telerik:RadTabItem Header="Define Manual Columns" Visibility="Visible" DataContext="{Binding Customers}">
               <StackPanel>
                   <ContentControl Content="{Binding}"  Grid.Row="0" Grid.RowSpan="2"  Grid.Column="1"       Width="Auto"  HorizontalAlignment="Stretch"                                     
                                         >
                       <ContentControl.Style>
                           <Style TargetType="ContentControl">
                               <Style.Triggers>
                                   <DataTrigger Binding="{Binding ReceiveNewsletter}" Value="True">
                                       <Setter Property="ContentTemplate">
                                           <Setter.Value>
                                               <DataTemplate>
                                                   <StackPanel >
                                                       <TextBlock x:Name="TestPanel1" Text="Test Panel"  Height="50" Width="50" VerticalAlignment="Top"  Foreground="Black" Margin="5"  />
                                                       <TextBlock  x:Name="TestPanel2" Text="Test Panel2" Height="50" Width="50" Foreground="Black" Margin="5"  />
 
                                                       <StackPanel  x:Name="ButtonsStack"   Orientation="Horizontal" HorizontalAlignment="Right"  VerticalAlignment="Bottom" Margin="0,100,5,0">
 
                                                           <telerik:RadButton x:Name="EditStyle"  ToolTipService.ToolTip="Edit" Height="25" Width="25">
                                                           </telerik:RadButton>
                                                           <telerik:RadButton x:Name="CopyStyle"  ToolTipService.ToolTip="Copy" Height="25" Width="25" >
                                                           </telerik:RadButton>
                                                           <telerik:RadButton x:Name="CancelSave1"  ToolTipService.ToolTip="Delete" Height="25" Width="25" >
 
                                                           </telerik:RadButton>
                                                       </StackPanel>
                                                   </StackPanel>
                                               </DataTemplate>
                                           </Setter.Value>
                                       </Setter>
                                   </DataTrigger>
 
                                   <!-- EDIT TEMPLATE -->
                                   <DataTrigger Binding="{Binding Temp}" Value="True">
                                       <Setter Property="ContentTemplate">
                                           <Setter.Value>
                                               <DataTemplate >
                                                   <StackPanel HorizontalAlignment="Stretch" Orientation="Vertical">
                                                    </StackPanel>
                                               </DataTemplate>
                                           </Setter.Value>
                                       </Setter>
                                   </DataTrigger>
                               </Style.Triggers>
                           </Style>
                       </ContentControl.Style>
                   </ContentControl>
               </StackPanel>
           </telerik:RadTabItem>
       </telerik:RadTabControl>


Stefan
Telerik team
 answered on 29 Jan 2014
4 answers
1.0K+ views

Hello !

Is it possible to automaticly open the DropDown bei Beginning of Typing a searchcriteria in a as Autocomplete configured Combobox ?

Scenario is MVVM.

OpenDropDownOnFocus is not my prefered behaviour.

 I found that StaysOpenOnEdit doesn't work and are absolete.

Kalin
Telerik team
 answered on 29 Jan 2014
2 answers
136 views

Hello,



We recently upgraded from Q3 2012 to Q3 2013.  The tooltips on our graphs no longer display. 



Here's the XAML:

<telerik:RadCartesianChart x:Name="CollectionChart" Margin="11,0" Grid.Column="1" HorizontalAlignment="Stretch">
  
<telerik:RadCartesianChart.Behaviors>
    <telerik:ChartTooltipBehavior VerticalOffset="7"/>
</telerik:RadCartesianChart.Behaviors>
  
<telerik:RadCartesianChart.TooltipTemplate>
    <DataTemplate>
        <Grid IsHitTestVisible="False">
            <Border BorderBrush="DarkGray" BorderThickness="1" CornerRadius="1">
                <StackPanel Background="WhiteSmoke" >
                    <TextBlock FontSize="11" Text="{Binding Category, StringFormat='\{0:MMMM yyyy\}'}" Padding="2,2,2,0" />
                    <TextBlock FontSize="11" Text="{Binding Value, StringFormat='\{0:C0\} Collection'}" Padding="2,0,2,2" />
                </StackPanel>
            </Border>
        </Grid>
    </DataTemplate>
</telerik:RadCartesianChart.TooltipTemplate>
  
<telerik:RadCartesianChart.VerticalAxis>
    <telerik:LinearAxis LabelFormat="C0"/>
</telerik:RadCartesianChart.VerticalAxis>
  
<telerik:RadCartesianChart.HorizontalAxis>
    <telerik:CategoricalAxis />
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:BarSeries x:Name="CollectionLastYearBarSeries" CombineMode="Cluster"
        CategoryBinding="MonthStringCategory" ValueBinding="Total" HorizontalContentAlignment="Left">
    <telerik:BarSeries.PointTemplate>
        <DataTemplate>
            <Border BorderBrush="#A8E083"
            BorderThickness="1" CornerRadius="1" MaxWidth="20" >
                <Rectangle Fill="#A8E083" MaxWidth="20"/>
            </Border>
        </DataTemplate>
    </telerik:BarSeries.PointTemplate>
</telerik:BarSeries>
  
<telerik:BarSeries x:Name="CollectionThisYearBarSeries" CombineMode="Cluster"
    CategoryBinding="MonthStringCategory" ValueBinding="Total" HorizontalContentAlignment="Left">
    <telerik:BarSeries.PointTemplate>
        <DataTemplate>
            <Border BorderBrush="#468020"
            BorderThickness="1" CornerRadius="1" MaxWidth="20" >
                <Rectangle Fill="#468020" MaxWidth="20"/>
            </Border>
        </DataTemplate>
    </telerik:BarSeries.PointTemplate>
</telerik:BarSeries>
  
</telerik:RadCartesianChart>


Can you please let me know what has changed? 

Thanks!

E Pons
Top achievements
Rank 1
 answered on 28 Jan 2014
1 answer
192 views
Hello,

Can I use the ArcGIS Mapprovider inside radmap without purchasing any license from ESRI ? I would also like to take screenshots of the map and use them in presentations. Are there any issues ?

Thanks,
Sai
Andrey
Telerik team
 answered on 28 Jan 2014
4 answers
450 views
hi,
1) I've created WPF UserControl that contains three RadAutoCompleteBox's.
I want to drag and drop items from one searchbox to another within the wpf control.
I've tried setting AllowDrop="true", DragEnter="autocompletebox_DragEnter", DragLeave="autocompletebox_DragLeave"
and nothing happens.., (it's doesn't enter the events methods). what do i missing?

2) And another question, The DropDown ItemsSource is binded to a list:  List<INameWithIcon> EntityList.
I want to show both icon and name in the DropDown AND in the searchbox.

that is part of what i've defined-  

 TextSearchPath="Name"
 DropDownItemTemplate="{StaticResource EntitySearchTemplate}"

<DataTemplate x:Key="EntitySearchTemplate">
        <StackPanel Orientation="Horizontal">
            <Border>
                <Image Source="{Binding Path=IconPath}" />
            </Border>
            <TextBlock Text="{Binding Path=Name}" Style="{StaticResource AutoCompleteStyle}" Margin="10 0 0 0"/>
        </StackPanel>
    </DataTemplate>
Itsik
Top achievements
Rank 1
 answered on 28 Jan 2014
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?