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

I am using a RadChart control with multiple RadChartAreas defined. I wanted to show individual legends belonging to each Chart area but they aren't visible. Even though I followed the examples but couldn't get the legends to display.

Here's my source code:

<telerik:RadChart x:Name="LineChartCusips" ScrollViewer.CanContentScroll="True">
                    
                    <Grid Margin="0,0,10,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="5*" />
                            <ColumnDefinition Width="2*" />                            
                        </Grid.ColumnDefinitions>
                        <telerik:ChartTitle Grid.Row="0"  
                                            Grid.ColumnSpan="2"
                                            Content="Year 2010"
                                            HorizontalAlignment="Center"                                            
                                            Style="{StaticResource CustomTitleStyle}"/>
                        
                        <telerik:ChartArea Grid.Row="1"
                                           Grid.Column="0"
                                           Grid.ColumnSpan="2"
                                           Padding="5,10,20,5"
                                           x:Name="splineChartArea"
                                           LegendName="splineLengend"                                           
                                           ItemToolTipOpening="splineChartArea_ItemToolTipOpening"/>

                        
                        <telerik:ChartTitle Grid.Row="2"
                                            Content="Monthly Distribution"
                                            Grid.ColumnSpan="2"
                                            HorizontalAlignment="Center"
                                            Style="{StaticResource CustomTitleStyle}"/>
                        
                        <telerik:ChartArea Grid.Row="3"
                                           Grid.Column="0"
                                           x:Name="barChartArea"
                                           LegendName="barLegend"
                                           ItemToolTipOpening="ChartArea2_ItemToolTipOpening"/>
                        
                        <telerik:ChartArea Grid.Row="3"
                                           Grid.Column="1"
                                           x:Name="pieChartArea"
                                           />
                      
                                                
                    </Grid>

For one of the chart areas, splineLengend, here's the code behind:
DataSeries newSeries = new DataSeries();
                newSeries.LegendLabel = tranchedata.Key.ToString();
                newSeries.Definition = new LineSeriesDefinition();
                newSeries.Definition.InteractivitySettings.HoverScope = InteractivityScope.Series;
                newSeries.Definition.InteractivitySettings.SelectionScope = InteractivityScope.Series;                
                newSeries.Definition.ShowItemLabels = true;
                newSeries.Definition.ShowItemToolTips = true;

Thanks,
Farhan
Yavor
Telerik team
 answered on 25 Oct 2010
0 answers
92 views

Several weeks before the official release we wanted to give a preview of some of the major new controls and features coming in Q3 2010.

The new ScheduleView control for WPF 

As we announced in the beginning of this quarter we started working on a brand new scheduling component. Now that the first bits appeared you can find the new ScheduleView in the RadControls for WPF bundle. We decided to develop this new control as we wanted to prepare a really advanced Scheduling control that would fit in any application scenario. You can review the major features of the control on its product page. You can expect identical behavior, featureset and API for the ScheduleView for Silverlight that will officially come shortly after Q3 2010. 

Data Virtualization

With our 2010 Q3 Beta release we are introducing the concept of Data Virtualization - a new extension to our LINQ based data engine. The Data Virtualization technique ensures great performance and user experience improvements especially when dealing with very large datasets. The “heart” of Data Virtualization is the VirtualQueryableCollectionView class, which is responsible for loading on demand the needed chunks of data to the client. 

Data virtualization enables smooth scrolling experience in all data bound controls, which makes the components responsive all the time regardless the amount of data you present. To work properly you should use controls with UI virtualization like RadGridViewRadTreeViewRadBookRadComboBox.

Sparklines

Sparklines are used for quick graphical data visualization in the context of words, numbers or images. Their simple design and clear readability are the best way to present important business or other trends. The Sparklines are designed to be very small in size so they can perfectly fit in any text or simple grid along with other numeric data.

You can download the installation files under your accounts. The files are marked with Q3 2010 Beta.

Online demos are available at:
RadControls for WPF

We will greatly appreciate your feedback in this Beta forum.

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 25 Oct 2010
2 answers
241 views

The default scrolling behavior of a ListBox is that the scrolling goes by one item at a time. The scrolling is not smooth but as you scroll the ListBox jumps to the next item. Although if you want to you can get the ListBox to scroll smoothly by setting ScrollViewer.CanContentScroll="False".

 

The RadGridView seems to have the opposite default scrolling behavior. The RadGridView scrolls smoothly in both vertical (rows) and horizontal (columns) directions.

 

Is it possible to make the RadGridView scoll by one row or column at a time, like the ListBox does by default with its items?

 

I've tried setting ScrollViewer.CanContentScroll="True" but without luck.

haagel
Top achievements
Rank 1
 answered on 25 Oct 2010
1 answer
78 views
WPF VS2010

OK, I read through everything I could find and could not find the answer I was looking for.  How can I add an item to the list of options?  I don't want to completely create a new filter control but I want to add "Is Null", "Is Not Null" to the list of choices.  Is that possible?
Vlad
Telerik team
 answered on 25 Oct 2010
1 answer
165 views

I use a RadGridView to show data. The user is allowed to sort by any column by clicking it, using the built-in sorting feature. This works fine.

 

The problem occurs when the rows in the gridview are replaced. The gridview is always filled with rows after the user has done a search. However, the new rows are not sorted in the specified way.

 

Example:

The user does a search which fills the gridview with rows.

The user clicks the header of column A to sort by that column.

The user does a new search which fills the gridview with new  rows.

The gridview now still indicates that is is sorted by column A, but the rows are NOT sorted in that way

 

Is this a bug or "by design"? Is there any way to solve my problem?

 

If no better solution exist, I was thinking that maybe I can manually tell the gridview to sort the rows according to its current sorting state after I have filled it with new rows. But I cannot find a way to do that neither...

Vlad
Telerik team
 answered on 25 Oct 2010
5 answers
682 views
I'm binding the RadGridView to an ObservableCollection of about 1,000 items or so. I have both Row and Column Virtualization turned on. When I'm displaying my grid cells as plain TextBlocks, the realtime scrolling performance is pretty decent (Immediate scrolling is not an option). But once I start using more complex templates, like my own custom editors, scrolling performance suffers greatly, and becomes very choppy. The grid definition looks something like:

   <telerik:RadGridView
                         ItemsSource="{Binding MyItemsSource}"
                         ScrollMode="RealTime"
                         SelectionMode="Extended"
                         AutoGenerateColumns="False"
                         EnableColumnVirtualization="True"
                         EnableRowVirtualization="True">

and the columns looks like:

 <telerik:GridViewDataColumn Header="Price">

                <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Price.Value}" />
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellTemplate>

            </telerik:GridViewDataColumn>

Even if I keep the entire grid as TextBlocks but just make even a couple of columns TextBoxes, the scrolling performance starts to degrade fairly quickly. If  I disable both row and column Virtualization completely, then the grid scrolls very fast, but starts to take up a lot of memory (because it's instantiating all of the visual trees, it's something around 1GB memory usage). Are there any other settings that can help with the scrolling performance, or anything else that I can do ? I've found the grid very performant is almost all other scenarios, and it would be a shame to discard an otherwise well performing grid because of lackluster scrolling.
Milan
Telerik team
 answered on 25 Oct 2010
3 answers
603 views
In the RadComboBox I have a IsMouseOver trigger and an IsFocused trigger.  The IsMouseOver trigger changes the background color while the IsFocused trigger does not.  How can I make this work?  I've also tried doing this in the editabletemplate with no luck.

Here is test markup that demonstrates:  It should trigger a Black background on keyboard focus.

<Window 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    x:Class="WpfApplication12.MainWindow" 
    x:Name="Window" 
    Title="MainWindow" 
    Width="327" Height="217"
 
<Window.Resources> 
 <Style  x:Key="{x:Type telerik:RadComboBox}"  TargetType="{x:Type telerik:RadComboBox}"
     <Style.Triggers> 
        <MultiTrigger> 
          <MultiTrigger.Conditions> 
             <Condition Property="IsEnabled" Value="True"/> 
             <Condition Property="IsFocused" Value="True"/> 
          </MultiTrigger.Conditions>                             
          <Setter Property="Background" Value="Black" /> 
        </MultiTrigger> 
        <MultiTrigger> 
          <MultiTrigger.Conditions> 
             <Condition Property="IsEnabled" Value="True"/> 
             <Condition Property="IsMouseOver" Value="True"/> 
          </MultiTrigger.Conditions>                             
          <Setter Property="Background" Value="Blue" /> 
        </MultiTrigger> 
     </Style.Triggers> 
 </Style> 
  
</Window.Resources> 
 
    <Grid x:Name="LayoutRoot"
        <Grid.RowDefinitions> 
         <RowDefinition Height="50" /> 
         <RowDefinition Height="50" /> 
        </Grid.RowDefinitions> 
        <TextBox >Some text</TextBox> 
        <telerik:RadComboBox  Grid.Row="1" IsEditable="True" IsReadOnly="True" Margin="0,0,0,1"
            <telerik:RadComboBoxItem Content="Item 1"/> 
            <telerik:RadComboBoxItem Content="Item 2"/> 
            <telerik:RadComboBoxItem Content="Item 3"/> 
        </telerik:RadComboBox> 
    </Grid> 
</Window> 
  
Dani
Telerik team
 answered on 25 Oct 2010
2 answers
130 views
Hello!
Since the Telerik documentation having this "How to" referring to adding a menu item to RadPane's menu is obsolete because is using the CustomMenuCommand I have a question for you.

I am adding a RadMenuItem to the template I use for all the radpanes as follows:
<DataTemplate x:Key="PaneContextMenuTemplate">
            <telerik:RadContextMenu InheritDataContext="False">
                <telerik:RadMenuItem IsChecked="{Binding IsInDocumentHost}"
                                     Command="telerikDocking:RadDockingCommands.TabbedDocument"
                                     CommandParameter="{Binding}"
                                     CommandTarget="{Binding}"
                                     Header="{Binding Command.Text,              RelativeSource={RelativeSource Self}}" />             
                <telerik:RadMenuItem IsCheckable="False"
                                     Header="Change header name"
                                     Click="RadMenuHeaderChange_Click" />
            </telerik:RadContextMenu>
        </DataTemplate>


In RadMenuHeaderChange_Click method I need to get somehow the RadPane that owns the RadContextMenu that has been opened. 
How can I achieve that?

Thank you!
Roxana

RoxanaC
Top achievements
Rank 1
 answered on 23 Oct 2010
6 answers
157 views
I have a fairly simple radgridview I'm messing around with.  the data is loaded from a dataset, I only have 1 column that is editable (all others are readonly).  However, when I edit that column it clears the cell rather than letting me edit the value it is currently.

the code:


<telerik:RadGridView HorizontalAlignment="Left" Margin="12,78,0,0" 
                             Name="gvAccounts" VerticalAlignment="Top" Height="240" Width="619" 
                             AutoGenerateColumns="False" Grid.Column="0" CanUserSortColumns="False" 
                             DataLoaded="gvAccounts_DataLoaded" LoadingRowDetails="gvAccounts_LoadingRowDetails" 
                             CanUserReorderColumns="False" ShowGroupPanel="False" EditTriggers="CellClick" 
                             BeginningEdit="gvAccounts_BeginningEdit">
            <telerik:RadGridView.Columns>
                <telerik:GridViewSelectColumn />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding acct_num}"
                                       Header="Account No" IsReadOnly="True"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding reg_phone_num, Mode=TwoWay}"
                                       Header="Mobile Phone No" IsReadOnly="True">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding nickname, Mode=TwoWay}"
                                       Header="Nickname">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding created_dt, Mode=TwoWay}"
                                       Header="Date Activated" IsReadOnly="True">
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding address, Mode=TwoWay}"
                                       Header="Service Address" IsReadOnly="True" TextWrapping="Wrap">
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
jake
Top achievements
Rank 1
 answered on 22 Oct 2010
2 answers
96 views
Hi,

We've noticed that using RadDocking if we have a floating ToolWindow which is later closed and the docking layout is saved then later loaded with LoadLayout we see the floating toolwindow appear briefly then animate/fade away.

I'd like to avoid the confusing UI experience. Does anyone know how to avoid seeing this brief glimpse of the floating toolwindow before LoadLayout decides to hide it? 

John
John Schroedl
Top achievements
Rank 2
 answered on 22 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?