Telerik Forums
UI for WPF Forum
1 answer
113 views
Hi,

Please tell me the way to override the custom color and appearance of  the CarouselScrollButton. I tried the following code and it didn't have any effect on button.
<br> <telerik:CarouselScrollButton Margin="2" CarouselScrollButtonType="LineLeft" Grid.Column="1" Height="40" Width="40" Command="{x:Static ScrollBar.LineLeftCommand}" Style="{StaticResource CarouselScrollButtonStyle}" ><br>                        <telerik:CarouselScrollButton.Foreground><br>                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"><br>                                <GradientStop Color="#FFD0F262" Offset="0.004"/><br>                                <GradientStop Color="#FFDEEC58" Offset="1"/><br>                            </LinearGradientBrush><br>                        </telerik:CarouselScrollButton.Foreground><br>                    </telerik:CarouselScrollButton>

Please tell me what  am i doing wrong.


Regards,
Raj.


Vanya Pavlova
Telerik team
 answered on 14 Oct 2010
5 answers
261 views
Hello,

I have problem using the event "MouseDoubleClick" on RadTreeViewItem.
It is handled for each branch item and it don't care about e.Handled = true.

Example :

        <telerik:RadTreeView IsDragDropEnabled="True" MouseDoubleClick="treeView_MouseDoubleClick">  
            <telerik:RadTreeView.ItemContainerStyle> 
                <Style TargetType="{x:Type telerik:RadTreeViewItem}">  
                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>  
                    <Setter Property="IsExpanded" Value="True"/>  
                    <EventSetter Event="MouseDoubleClick" Handler="treeViewItem_MouseDoubleClick"/>  
                </Style> 
            </telerik:RadTreeView.ItemContainerStyle> 
            <telerik:RadTreeView.ItemTemplate> 
                <HierarchicalDataTemplate ItemsSource="{Binding Children}">  
                    <Border BorderThickness="1" BorderBrush="LightGray" Margin="2" CornerRadius="5">  
                        <Grid> 
                            <Grid.ColumnDefinitions> 
                                <ColumnDefinition Width="Auto"/>  
                                <ColumnDefinition Width="*"/>  
                            </Grid.ColumnDefinitions> 
                            <TextBlock Grid.Column="0" Text="{Binding Key}" Margin="3,0,10,0"/>  
                            <GridSplitter Grid.Column="0" Width="1" Background="LightGray" ResizeDirection="Columns" dragDrop:RadDragAndDropManager.AllowDrag="True" dragDrop:RadDragAndDropManager.DragQuery="GridSplitter_DragQuery"/>  
                            <TextBlock Grid.Column="1" Text="{Binding Text}" Margin="3,0,0,0"/>  
                        </Grid> 
                    </Border> 
                </HierarchicalDataTemplate> 
            </telerik:RadTreeView.ItemTemplate> 
            <telerik:RadTreeView.Items> 
                <local:PairText Key="line1" Text="Some text for line1"/>  
                <local:PairText Key="line2" Text="Some text for line2"/>  
                <local:PairText Key="line3" Text="Some text for line3">  
                    <local:PairText.Children> 
                        <local:PairText Key="line3.1" Text="Some text for line3.1"/>  
                        <local:PairText Key="line3.2" Text="Some text for line3.2"/>  
                        <local:PairText Key="line3.3" Text="Some text for line3.3"/>  
                    </local:PairText.Children> 
                </local:PairText> 
                <local:PairText Key="line4" Text="Some text for line4"/>  
                <local:PairText Key="line5" Text="Some text for line5"/>  
            </telerik:RadTreeView.Items> 
        </telerik:RadTreeView> 
        private void treeView_MouseDoubleClick(object sender, MouseButtonEventArgs e)  
        {  
            MessageBox.Show("Tree");  
            e.Handled = true;  
        }  
 
        private void treeViewItem_MouseDoubleClick(object sender, MouseButtonEventArgs e)  
        {  
            PairText pair = (sender as RadTreeViewItem).Item as PairText;  
            MessageBox.Show("Item : " + pair.Key);  
            e.Handled = true;  
        }  
 

When I double click on "line3.2" I want to obtain only the "Item : line3.2" message but there is "Item : line3" and "Tree" messages too.

Have you any suggestions ?

Thanks,
Guillaume R.
Tina Stancheva
Telerik team
 answered on 14 Oct 2010
3 answers
91 views
Sometimes when refreshing my grid I'm getting a modal overlay (transparent navy blue in color) with a indeterminate load circle on it.

The data still updates under the modal.. but the modal does not go away.. this behavior is reproducible.. but seems to be specific to certain data I'm changing in my grid.

Any ideas?
Vlad
Telerik team
 answered on 14 Oct 2010
1 answer
159 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
93 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
353 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
168 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
202 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.1K+ 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
725 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
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
PersistenceFramework
DataPager
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
ProgressBar
Sparkline
LayoutControl
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
Rating
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?