Telerik Forums
UI for WPF Forum
1 answer
118 views
Hi everybody,

if I copy data of the RadGridView into the clipboard I can paste it into an Excel sheet only as long as the source application (e.g. the demo application but also my own application) is running. Is there a way to keep the data in the clipboard after closing the application?

Regards Uli
Yavor Georgiev
Telerik team
 answered on 14 Oct 2010
1 answer
84 views

I put this control on a grid and it dramatically reduces the rendering speed of the grid.  It takes noticeably longer to scroll down.

Am I doing something wrong?

Here is what I have added to the Grid.

<telerik:GridViewDataColumn  DataMemberBinding="{Binding Path=Rating}" Header="Rating" MinWidth="60" Width="SizeToCells">
                       <telerik:GridViewColumn.CellTemplate>
                          <DataTemplate>
                             <telerikInput:RadRating Name="_leadRating"  Value="{Binding Path=Rating,Mode=TwoWay}" UseLayoutRounding="True">
                                <i:Interaction.Triggers>
                                   <i:EventTrigger EventName="ValueChanged">
                                      <cmd:EventToCommand Command="{Binding Path=DataContext.ChangeRatingCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=UserControl, AncestorLevel=1}}" CommandParameter="{Binding}" />
                                   </i:EventTrigger>
                                </i:Interaction.Triggers>
                             </telerikInput:RadRating>
                          </DataTemplate>
                       </telerik:GridViewColumn.CellTemplate>
                    </telerik:GridViewDataColumn>

 

Viktor Tsvetkov
Telerik team
 answered on 14 Oct 2010
2 answers
335 views
Hi All ,
I need advise and guide, i have difficult dealing with radgridview (wpf), i want to bind a column image with dynamic path value,  the images is stored in "[solutionpath]/Resources/Images/", I wonder why i have a message that the path is not found.
Assumed bind value for image path is "../Resources/Images/icon.jpg".

I have these piece of code :
<Grid x:Name="LayoutRoot" Background="White">
    <Grid.Resources>                                               
        <local:KPI_Diff_Style x:Key="_DiffStyle" >
            <local:KPI_Diff_Style.UpStyle>
                <Style TargetType="telerik:GridViewCell">
                    <Setter Property="Background" Value="Red"/>                                                        
                </Style>           
            </local:KPI_Diff_Style.UpStyle>        
            <local:KPI_Diff_Style.DownStyle>
                <Style TargetType="telerik:GridViewCell">
                    <Setter Property="Background" Value="Yellow"/>             
                </Style>           
            </local:KPI_Diff_Style.DownStyle>        
            <local:KPI_Diff_Style.EqStyle>
                <Style TargetType="telerik:GridViewCell">
                    <Setter Property="Background" Value="Green"/>              
                </Style>           
            </local:KPI_Diff_Style.EqStyle>        
        </local:KPI_Diff_Style>
    </Grid.Resources>
    <telerik:RadGridView x:Name="gridKPI" CanUserFreezeColumns="False" ItemsSource="{Binding}" ShowGroupPanel="False" GridLinesVisibility="Horizontal" AutoGenerateColumns="False">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding KPINameDisplay}" Header="KPI Trends" />
            <telerik:GridViewDataColumn DataMemberBinding="{Binding KPIName}" Header="KPI Name" />
            <telerik:GridViewDataColumn DataMemberBinding="{Binding MapKPIColumnName}" Header="KPI Column Name" />
            <telerik:GridViewDataColumn DataMemberBinding="{Binding StartDate}" Header="Start Date" />
            <telerik:GridViewDataColumn DataMemberBinding="{Binding EndDate}" Header="End Date" />
            <telerik:GridViewImageColumn DataMemberBinding="{Binding ImageUpDown}" Header="Difference" ImageStretch="None" CellStyleSelector="{StaticResource _DiffStyle}" MinWidth="5" />                                                 
            <telerik:GridViewDataColumn DataMemberBinding="{Binding ImageView}" Header="View" >
                <telerik:GridViewDataColumn.CellTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">                                                               
                            <Button Content="View Details" />                                                              
                        </StackPanel>
                    </DataTemplate>
                </telerik:GridViewDataColumn.CellTemplate>
            </telerik:GridViewDataColumn>
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>
</Grid>

Thanks
aryz
Top achievements
Rank 1
 answered on 14 Oct 2010
2 answers
145 views
Hi There,
I am using following xaml to hide the GridViewIndentCell, and it works fine.

 <Style TargetType="GridView:GridViewIndentCell">
            <Setter Property="Visibility" Value="Collapsed" />
            <Setter Property="Background" Value="White" />
   </Style>

But, GridViewIndentCell re-appears as soon as I Group the data. Please advice  how to stop the GridViewIndentCell  re-appearing.
Thanks,
Andre Joosten
Top achievements
Rank 1
 answered on 13 Oct 2010
2 answers
181 views
Hi,

I have set up constant areas : a width of 200 for the chart area and a width of 100 for the legend area.

The problem is when a label of the legend is too long for the defined width, the label is cut.

So, how could I wrap text labels of the legend of a chart ?

Thanks.
Aaron
Top achievements
Rank 2
 answered on 13 Oct 2010
4 answers
1.0K+ views
Hello, let's start with a little background on our app.

We use RadDocking with a RadGridView in one of the panes.  The problem we have is the scroll position is getting reset to the top row when the pane containing the grid is pinned or unpinned (It seems to re-get the bound ItemsSource each time the grid is loaded and unloaded causing the grid to refresh).  To try getting around this issue I tried getting and setting the scrollbar's value when the grid is loaded / unloaded.  However, when I set the scrollbar's value, I am unable to physically move the scrollbar.  I can however see the items changing as if it was scrolling properly, just the bar doesn't move.  I am using the latest 9/24/2010 release.

I added a simple WPF ScrollBar control and I can set the value and still scroll the control properly.

Is this an issue with the ScrollBar the grid is using?

If there is any other recommendations on how to keep the scroll position, I am open to that as well.

Here is some quick code showing how I am doing this.
private void Window_Loaded(object sender, RoutedEventArgs e)
{
    // Get GridView ScrollBar object
    ScrollBar verticalScrollBar = this.RadGridView1.ChildrenOfType<ScrollBar>().Where(s => s.Orientation == Orientation.Vertical).First();
  
    // Set value on GridView - Goes to bottom, but cannot get scrollbar to move
    verticalScrollBar.Value = verticalScrollBar.Maximum;
  
    // Set value on WPF ScrollBar - Goes to bottom, and scrollbar moves fine
    this.WpfBar1.Value = this.WpfBar1.Maximum;
}


Thanks All for your help.
Veselin Vasilev
Telerik team
 answered on 13 Oct 2010
13 answers
673 views
Hello,
I am trying to set the style of my GridViewDataColumn to a textbox and am having some difficulty.
This is the latest thing I have tried.  It seems that i should not be having this much trouble.
I have seen examples of checkboxes and images but cannot find a RadMaskedTextBox example. Could you provide one?

Thank you.
                        <telerikPres:RadGridView ItemsSource="{Binding}>
                            </telerikPres:RadGridView.Columns>
                                    <telerikPres:GridViewDataColumn Header="My RadMaskedTextBox" UniqueName="MyDecimalField">
                                        <telerikPres:GridViewColumn.CellStyle>
                                            <Style TargetType="{x:Type telerikPres:GridViewCell}">
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="{x:Type telerikPres:GridViewCell}">
                                                            <telerikInput:RadMaskedTextBox Margin="0 3 0 3"  Width="55" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MyDecimalField, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center"  MaskType="Numeric" Mask="n2"  />
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                            </telerikPres:GridViewColumn.CellStyle>
                                    </telerikPres:GridViewDataColumn>
                            </telerikPres:RadGridView.Columns>
Veselin Vasilev
Telerik team
 answered on 13 Oct 2010
1 answer
92 views
I downloaded radControlTelerik for WPF in www.telerik.com . But I don't see rad control splitter in Toolbox.
Does radControlTelerik have support splitter for WPF?
Alex Fidanov
Telerik team
 answered on 13 Oct 2010
4 answers
1.0K+ views

I have a GridView with several columns. I am using a subset of columns to the right to show bars like a kind of Gantt chart.

I want to style the cells in the rows in such a way that each Cell merge with the cell to its left and the cell to its right (no merge with above or below cells) in order to produce the impression that there is a horizontal bar created by setting the background color.

I set up padding and also margin to (0,10, 0,10) in the Cell Template and hidden the columns vertical  lines but I still get a gap between the cells.
I also created a GridViewCellStyle copied from the default as suggested in the documentation, I assigned to the DataColumns tag but make no difference. I can't get rid of the gaps. So I may be doing something wrong.

1. Could you be so kind of tell me how can I get this result.

2. I need to change the name of the columns header dynamically. I can do it from code behind but if I want to do it from XAML how I do that?

Thanks

Vanya Pavlova
Telerik team
 answered on 13 Oct 2010
3 answers
73 views
Hi,

How can show vertical scroll bar programatically.

I've tried the below code, but no luck

RadGridView1.SetValue(ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Visible);

Thanks,
-Narendra
Vlad
Telerik team
 answered on 13 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?