Telerik Forums
UI for WPF Forum
2 answers
632 views
Hi,

I found this blog post http://www.buildsucceeded.com/post/2009/07/17/WPF-Disabling-a-row-in-a-Grid-based-off-of-a-value-in-the-source.aspx that talks about using style triggers to turn the grid row on/off using binding. I cannot make this to work with my HierarchyChildTemplate control.

<telerik:RadGridView x:Name="DetailsView"
CanUserFreezeColumns="False" CanUserDeleteRows="True" CanUserInsertRows = "True"
SelectionMode="Single" SelectionUnit="FullRow"
AutoGenerateColumns="False" 
ShowInsertRow="True"
ItemsSource="{Binding ReceiptEditRows, Mode=OneWay}" 
SelectedItem="{Binding DataContext.SelectedRowViewModel, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
ShowGroupPanel="False"
IsReadOnly="False"  IsFilteringAllowed="False">
   <telerik:RadGridView.Resources>
      <Style TargetType="{x:Type telerik:GridViewRow}">
         <Setter Property="IsEnabled" Value="True" />
         <Style.Triggers>
            <DataTrigger Binding="{Binding Path=CanEditChildRow}" Value="True">
               <DataTrigger.Setters>
                  <Setter Property="IsEnabled" Value="True" />
               </DataTrigger.Setters>
            </DataTrigger>
         </Style.Triggers>
      </Style>
   </telerik:RadGridView.Resources>
   <telerik:RadGridView.Columns>

Is this supposed to work?

Petar.
Petar
Top achievements
Rank 1
 answered on 14 May 2011
3 answers
187 views
Hello,

We have a gridview in a usercontrol that we would like to exand to the size of the window.  However, unless you specifiy the size of the Gridview or the Size of the usercontrol the scroll bars will not appear.  Is there a way around this?  Please note we're using a gridview inside of grid where the grid row definition Height definition is set to "*".  Below is the xaml code along with a screenshot.

<UserControl  
    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" 
    xmlns:Controls="clr-namespace:Dad.Common.UI.Controls;assembly=Dad.Common" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Dad.Modules.Security.Presentation.Views.OrganizationalUnits" 
    Margin="1" HorizontalAlignment="Left" VerticalAlignment="Top"   
    mc:Ignorable="d" d:DesignWidth="680" d:DesignHeight="600" 
    >   
      
<!--    <Grid Margin="1,1,1,1"> --> 
          
 
<Grid> 
 
        <Grid.RowDefinitions> 
            <RowDefinition Height="80"/>  
            <RowDefinition Height="40"/>  
            <RowDefinition Height="*"/>  
        </Grid.RowDefinitions> 
          
        <Border Grid.Row="0" Margin="0,0,0,0" VerticalAlignment="Top" Height="80" Width="Auto">  
            <Border.Background> 
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">  
                    <GradientStop Color="#FF175D12"/>  
                    <GradientStop Color="#FF93D48E" Offset="1"/>  
                </LinearGradientBrush> 
            </Border.Background> 
            <Image HorizontalAlignment="Left" Margin="0,0,0,2" Width="371" Source="/Dad.Modules.Security;Component/Images/OULabel.png"/>  
        </Border> 
          
        <Border Grid.Row="1" Margin="0,0,0,0" VerticalAlignment="Top" Height="40" Width="Auto">  
            <StackPanel Orientation="Horizontal">  
 
                <telerik:RadButton Content="Refresh" Height="30" Width="80" Margin="15,5,0,5"/>  
                <Controls:RadGridViewExporter Height="30" RadGridView="{Binding ElementName=OUGridView}" /> 
                  
            </StackPanel> 
        </Border> 
          
            <telerik:RadGridView x:Name="OUGridView" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                ItemsSource="{Binding OrganizationalUnits}"/>  
 
</Grid>   
</UserControl> 


Dave
Top achievements
Rank 2
 answered on 13 May 2011
4 answers
329 views
Hi

I would like to bind the TreeView using HierarchicalDataTemplate:

 

 

 

<HierarchicalDataTemplate x:Key="rufTreeNode" ItemsSource="{DynamicResource Nodes}" DataType="{x:Type TreeRuf:RufTreeNode}">

 

 

 

 

 

</HierarchicalDataTemplate>

 



My question is how I can bind the DefaultImageSrc, ExpandedImageSrc. All I want is just to bind your existing control (ItemTemplate) to my data using HierarchicalDataTemplate. There is an unlimited level of subnodes. Could you provide the xaml for ItemTemplate or just modify my example above?

Kind regards,

Marinko
Chadwick
Top achievements
Rank 1
 answered on 13 May 2011
7 answers
386 views
Hello,

After upgrading to Q1 2011 I am getting this exception from time to time:

System.InvalidOperationException: Cannot resolve all property references in the property path 'Effect.Progress'. Verify that applicable objects support the properties.
   at System.Windows.Media.Animation.Storyboard.VerifyPathIsAnimatable(PropertyPath path)
   at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
   at System.Windows.Media.Animation.Storyboard.ClockTreeWalkRecursive(Clock currentClock, DependencyObject containingObject, INameScope nameScope, DependencyObject parentObject, String parentObjectName, PropertyPath parentPropertyPath, HandoffBehavior handoffBehavior, HybridDictionary clockMappings, Int64 layer)
   at System.Windows.Media.Animation.Storyboard.BeginCommon(DependencyObject containingObject, INameScope nameScope, HandoffBehavior handoffBehavior, Boolean isControllable, Int64 layer)
   at System.Windows.Media.Animation.Storyboard.Begin()
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.PlayAnimation()

Any ideas ?
Abdul
Top achievements
Rank 1
 answered on 13 May 2011
1 answer
86 views
The RadCarouselPanel control looks more like a coverflow. Can it be modified like a horizontal slideshow?
Vanya Pavlova
Telerik team
 answered on 13 May 2011
2 answers
119 views
Hi!
I'm using standard Telerik filtering control.
My question is: How to set filtering in code and make that selection visible in FilterControl.

I tried to set FilterDescriptor in code. It works fine. Grid filters rows but FilterControl does not check exact checkbox.

Thanks!

 
Artur Romanowski
Top achievements
Rank 1
 answered on 13 May 2011
2 answers
77 views
Hi all,

We have an issue with the TreeView, this issue is that when we select the checkbox of the parent, the child checkbox is not being selected. The weird part is that this behaviour only happens the first time when the tree is not expanded yet. If the tree is expanded then the behaviour works as expected.

I debugged on the events and I see that it only comes once in the event, which normally should happen twice. Is this a bug? Or how can I solve this issue?

Here is our TreeView:

<telerik:RadTreeView x:Name="treeModules"  SelectionMode="Extended" IsLineEnabled="True"
                                                        ItemsOptionListType="CheckList" IsOptionElementsEnabled="True"
                                                        IsRootLinesEnabled="True"  VerticalAlignment="Top" Margin="10" 
                                                        IsTriStateMode="True" Selected="treeModules_Selected"
                                                                         MouseRightButtonUp="treeModules_MouseRightButtonUp" ItemContainerStyle="{StaticResource ItemContainerStyle}"
                                                                         ItemsSource="{Binding ModuleListHelper, Mode=OneWay}" Checked="treeModules_Checked" Unchecked="treeModules_Checked">
                                                <telerik:RadTreeView.ContextMenu>
                                                    <ContextMenu>
                                                        <MenuItem x:Name="ctMenuDelete" Click="ctMenuDelete_Click" Header="Delete">
                                                            <MenuItem.Icon>
                                                                <Image Source="/images/trash.gif"/>
                                                            </MenuItem.Icon>
                                                        </MenuItem>
                                                    </ContextMenu>
                                                </telerik:RadTreeView.ContextMenu>
                                            </telerik:RadTreeView>
                                                <telerik:RadTreeView.ContextMenu>
                                                    <ContextMenu>
                                                        <MenuItem x:Name="ctMenuDelete" Click="ctMenuDelete_Click" Header="Delete">
                                                            <MenuItem.Icon>
                                                                <Image Source="/images/trash.gif"/>
                                                            </MenuItem.Icon>
                                                        </MenuItem>
                                                    </ContextMenu>
                                                </telerik:RadTreeView.ContextMenu>
                                            </telerik:RadTreeView>

Thank you!

Maarten
Top achievements
Rank 1
 answered on 13 May 2011
1 answer
120 views
I just wanted to create completely custom styled <telerik:OrientedAppointmentItemStyleSelector.HorizontalStyle> items. I've created resources via Expression Blend and all that stuff.

Then I wanted to edit the template like follows - making it bigger and putting additional controls in it.
<Setter Property="Template">
    <Setter.Value>
        <ControlTemplate TargetType="{x:Type telerik:AppointmentItem}">
            <Grid x:Name="Root" Height="150">
                ...

I can put additional controls in the grid, but it is not getting bigger. The size remains small and the content is cut off. The Height="150" property seems to have no effect. What's going on here?
Dani
Telerik team
 answered on 13 May 2011
1 answer
60 views
Let DoubleValue be a wrapper type around a Double, with an attached TypeConverter that knows how to convert from/to Double. And suppose that we have a GridViewDataColumn bound, via DataMemberBinding, to a property of this type. Pasting numeric strings to this column doesn't work, internally generating an InvalidCast exception.

To me this looks like a bug, the column is ignoring the attached type descriptor. It should be doing
System.TypeDescriptor.GetConverter(...).ConvertFrom(...)
Vlad
Telerik team
 answered on 13 May 2011
3 answers
220 views
Hi,
I am facing an issue while using the telerik treeview in below scenerio.
the images of the expander has to be changed and it has to be dynamically chosen between two images based on the data is binded to it.
when data is binded to the treeview, based on the boolean column, the nodes has to display different images, if this value is true it has to show one image and if it false it has to show another image.
when the node has expanded, then the image of that noted should be rotated version of the image shown earlier (before expanding).
Kiril Stanoev
Telerik team
 answered on 13 May 2011
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?