Telerik Forums
UI for WPF Forum
2 answers
125 views
Is it possible to have the legend for a chart appear as a tooltip for the chart, rather than being always displayed?

Steve
SteveL
Top achievements
Rank 2
 answered on 05 Aug 2009
5 answers
77 views
I'm new to Telerik WPF RadGridView, I have question:

1. I want to archive text wraping in RadGridView, but how ?
2. Can I set custom formatting for cell value? I have column long value type, but I want to display it as duration like 01:30.
    I have writing IFormatProvider for it, but don't know how to attach it do RadGridView Column.
3. I want to display row number in RadGridView, how do I do that (example):
    No. Name
    1    A
       B
4. Does RadGridView support saving and loading Layout?

Thx

Milan
Telerik team
 answered on 05 Aug 2009
5 answers
254 views
Hi,

We are using OnDemandLoad and binded tree with our datastructure. Howevere in certain case say if A is true then we do not want a certain node say Node1 to expand eventhough it gets data on demand i.e. only parent Node1 should be shown but no Childrens of it but at the same time we do not want to remove it from out binded datasource - in essence we need to hide them from tree.

Hope you get the problem. Please provide us ways/code lines to achieve this.

Thanks in advance,
Balaram
Miroslav
Telerik team
 answered on 04 Aug 2009
5 answers
209 views
Hi

I try to use a SumFunction in a GroupDescriptor in the following way
 
<telerik:RadGridView.GroupDescriptors> 
                                <telerik:GroupDescriptor Member="AccountName" SortDirection="Ascending">  
                                    <telerik:GroupDescriptor.AggregateFunctions> 
                                        <telerik:SumFunction SourceField="ActivityBudget" Caption="Invoices count:" /> 
                                    </telerik:GroupDescriptor.AggregateFunctions> 
                                </telerik:GroupDescriptor> 
                            </telerik:RadGridView.GroupDescriptors> 

but I get this error-

No method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied arguments.
Stefan Dobrev
Telerik team
 answered on 03 Aug 2009
2 answers
88 views
I have seen this in other WPF control, but last time I play with RadTreeView, then when the scrollbar appears.
It use the System Default Theme (in my System it was windows XP Style), it's feel weird because all other aspek of RadTreeView rendered using applied Theme.
Miroslav
Telerik team
 answered on 03 Aug 2009
1 answer
200 views
Hi there,

This may be quite simple, but can someone please tell me how to change the styling of labels (font, size, color etc) for RadialGuages and LinearGuages.

Also, I've tried the following code to get SemiCircle gauge styles working.

<UserControl  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    mc:Ignorable="d" 
    x:Class="TestWPFBrowser.WeatherGadget" 
    x:Name="UserControl" 
    d:DesignWidth="640" d:DesignHeight="480" Width="640" Height="400">  
 
    <UserControl.Resources> 
     <ResourceDictionary> 
      <ResourceDictionary.MergedDictionaries> 
       <ResourceDictionary Source="/Telerik.Windows.Controls.Gauge;component/Themes/Office_Black/NormalView.Styles.xaml" /> 
      </ResourceDictionary.MergedDictionaries> 
     </ResourceDictionary> 
    </UserControl.Resources> 

However I get the following error:

An error occurred while finding the resource dictionary "/Telerik.Windows.Controls.Gauge;component/Themes/Office_Black/NormalView.Styles.xaml".

Thanks for your help

Rav
Andrey
Telerik team
 answered on 03 Aug 2009
1 answer
118 views
Hi, i have a problem with RadGridView when applying the theme Telerik or Caramel, the HierarchyChild RadGridView do not appear,  only a little space is shown, but with other theme for example vista or Simple, it does show them, i need change some property???.

In the image 1, t does not show the Herarchichal items, and in the second image  it does show them


Image1:
http://www.imaxenes.com/imagen/image11bq89ic.jpg.html

image 2:

Regards!!
Missing User
 answered on 31 Jul 2009
3 answers
135 views
Hi,

I'm not sure if I do something wrong or if GridView simply insist on it's own designtime data.
I create a WPF project in expression blend 3 - add a RadGridView and create some DTD.
Binding it to RadGridView brings what I expected.
But after a build - I have northwind back again.
Here is how it looks:
http://www.pp-p.net/rgriddtd/

Regards

Manfred
Milan
Telerik team
 answered on 31 Jul 2009
2 answers
147 views
Hello,

here is my problem. I created a RadGriewView in my form and I have to use my own filters with it, so I use the following method:

        private void majradgridviewglobale()
        {
            if (this.filtresactifs.Count.Equals(0))
            {
                this.radGridView1.ItemsSource = TableResult;
            }
            else
            {
                DataTable tablevide = new DataTable();
                foreach (DataTable table in this.filtresactifs)
                {
                    tablevide.Merge(table);
                }
                this.radGridView1.ItemsSource = tablevide;
            }
        }

where filtresactifs is a datatablecollection and tableresult the datatable filled with the "unfiltered" data.

What happens is when I use the GridView filters (the checkboxes to select rows), then my own filter methods, everything works fine. When I uncheck the filters (the ones from the gridview) to cancel the gridview filter, my data is stuck to what it was when the filters from the grid view where active (even when nothing is checked!).

I did try to debug it and it seems that the DataTable given to radGridView1.ItemsSource are correct so I'm afraid I don't have much clue about this.

Can you give me a hint about this? Thanks.

PS: Excuse if my English is not that good, but I'm not a native speaker so I'm doing my best.

PS2: It looks like only the checkboxes are a problem, when I use the option "filters", looks like it works.
Yannick Lurot
Top achievements
Rank 1
 answered on 31 Jul 2009
3 answers
674 views
Hi

I noticed that the default RadGridView style does not provide a gray row when a Row is selected but not active; window with both textbox and gridView; select line in gridView; line is blue; activate textbox (click or tab); selected line is still blue.

I tried to modify this behavior inside a GridViewRow style using a Multitrigger but it seems that Selector.IsSelectionActive is always false.

This is my current GridViewRow template : 

   <Style TargetType="{x:Type telerik:GridViewRow}">
           
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type telerik:GridViewRow}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <Border x:Name="SelectionBackground"
                                    Grid.Column="2"
                     Background="{TemplateBinding Background}"
                     MinHeight="{TemplateBinding MinHeight}"
                     BorderBrush="{TemplateBinding BorderBrush}"
                     BorderThickness="{TemplateBinding BorderThickness}"
                     Margin="{TemplateBinding Margin}"
                     Padding="{TemplateBinding Padding}" />

                            <Rectangle x:Name="BackgroundRectangle"
                                       Grid.Column="2" Opacity="0"
                        Fill="{DynamicResource telerik.GridViewRowSelectedBackground}"
                        Stroke="{DynamicResource telerik.GridViewRowSelectedBorderBrush}"
                        StrokeThickness="1" />

                            <telerik:IndicatorPresenter x:Name="PART_IndicatorPresenter" 
                                                        Visibility="{TemplateBinding RowIndicatorVisibility}" Grid.Column="0"
                              Background="{TemplateBinding Background}"
                              BorderBrush="BlueViolet"
                              BorderThickness="1,0,1,1">

                                <Path x:Name="NavigatorIndicator"
          Fill="#FF000000" Stretch="Fill" Width="5" Height="8" Data="M254.5,183.75 L254.5,193.33333 260.75,188.16682 z"
          Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center" />

                            </telerik:IndicatorPresenter>
                            <telerik:IndentPresenter x:Name="PART_IndentPresenter" 
                                                     IndentLevel="{TemplateBinding IndentLevel}"
                                                     Grid.Column="1"
                                                     Background="{TemplateBinding Background}" />
                            <telerik:DataCellsPresenter  Height="Auto"
                                                         x:Name="PART_DataCellsPresenter"
                                                         Grid.Column="2"
                     MinHeight="{TemplateBinding MinHeight}" />

                            <Rectangle Width="Auto" Height="Auto"
                                       x:Name="InvalidBorder"
                                       Margin="0"
                                       Visibility="Collapsed"
                                       Stroke="Red"
                                       StrokeThickness="2"
                                       Grid.Column="0" Grid.ColumnSpan="3" />

                        </Grid>
 
                        <ControlTemplate.Triggers>
                           
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="Selector.IsSelectionActive" Value="false"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="Fill"
                                        TargetName="BackgroundRectangle"
                                        Value="{DynamicResource telerik.GridViewRowSelectedInactiveBackground}"/>
                                <Setter Property="Stroke"
                                        TargetName="BackgroundRectangle"
                                        Value="{DynamicResource telerik.GridViewRowSelectedInactiveBorderBrush}"/>
                            </MultiTrigger>

                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Opacity" TargetName="BackgroundRectangle" Value="1"/>
                            </Trigger>
                           
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background" TargetName="SelectionBackground" Value="{DynamicResource telerik.GridViewRowMouseOverBackgroundBrush}"/>
                            </Trigger>
                           
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="False" />
                                    <Condition Property="IsMouseOver" Value="True" />
                                </MultiTrigger.Conditions>
                                <Setter Property="Opacity" TargetName="BackgroundRectangle" Value=".5"/>
                            </MultiTrigger>
                           
                            <Trigger Property="IsCurrent" Value="True">
                                <Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible" />
                            </Trigger>
                           
                            <Trigger Property="IsContentValid" Value="False">
                                <Setter TargetName="InvalidBorder" Property="Visibility" Value="Visible" />
                            </Trigger>
                           
                        </ControlTemplate.Triggers>
                       
                    </ControlTemplate>
                </Setter.Value>
            </Setter>

            <Setter Property="IsTabStop" Value="False" />
            <Setter Property="BorderBrush" Value="{DynamicResource telerik.GridViewRowBorderBrush}" />
            <Setter Property="BorderThickness" Value="0,0,0,0" />
            <Setter Property="Margin" Value="0" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="MinHeight" Value="18" />
            <Setter Property="FontSize" Value="11" />
            <Setter Property="FontFamily" Value="Verdana" />
            <Setter Property="FontWeight" Value="Normal" />
            <Setter Property="Foreground" Value="#FF000000" />

             <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Path=IsAlternating, RelativeSource={RelativeSource Self}}" Value="true"/>
                        <Condition Binding="{Binding Path=UseAlternateRowStyle, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type telerik:RadGridView}}}" Value="true"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Background" Value="{DynamicResource telerik.GridViewRowAlternatingRowBackground}" />
                </MultiDataTrigger>
            </Style.Triggers>

        </Style>

Do you have any idea how to solve this ?

Kalin Milanov
Telerik team
 answered on 31 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?