Telerik Forums
UI for WPF Forum
2 answers
270 views
I have a GridView and use MVVM pattern, I bind SelectedItem to an object in my viewmodel, and on row edit ended pass this as a parameter to my insert method, as described in Telerik documentation here:

http://www.telerik.com/help/wpf/patterns-and-practices-eventtocommand-mvvmlight.html

Namely:

<telerik:RadGridView x:Name="xRadGridView" ItemsSource="{Binding GridItems, Mode=TwoWay}">
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="RowEditEnded">
               <i:InvokeCommandAction Command="{Binding TestCommand, Mode=OneWay}"
                              CommandParameter="{Binding ElementName=xRadGridView, Path=SelectedItem}"/>
            </i:EventTrigger>
        </i:Interaction.Triggers>
</telerik:RadGridView>

Here's the problem - when I first sort the grid by some field and then add a new item, the SelectedItem property on RowEditEnded event is set to an item that was the last item in the list prior to insert. 

For example, I have a field SequenceNumber and sort the grid in descending order. When I insert an item, the field is blank; I then enter a very high value that would place the item to the top of the list; however, the SelectedItem parameter has the value of the last item in the list (which would be the case if no sort was initially performed). Is this a known issue? Please help.
Dimitrina
Telerik team
 answered on 29 Oct 2013
1 answer
220 views
I tried to download the sample and is running the TabControl WPF sample.
It throws the error Cannot find resource named 'RadTabItemStyle' and if the style usage is commented out in the sample,
it shows nothing in the UI.
Any ideas on the usage?

Thanks,
Sujith
Milena
Telerik team
 answered on 29 Oct 2013
1 answer
164 views
Hi

I am looking for an example iterating an AggregateFunctionsGroup object that has n subgroups.  I want to create (in my custom format) the metadata to reproduce the GridView and also include the item data.  I do not want to use serializing.

Thanks
Rich
Dimitrina
Telerik team
 answered on 29 Oct 2013
1 answer
147 views
Is there a way to stretch the monthview so all of the days allways are visible?

When I resize the monthview in Outlook, the month and the day stretches.
How can I achieve this in the RadScheduleView?
Kalin
Telerik team
 answered on 29 Oct 2013
1 answer
152 views
The company I work for recently updated our telerik controls library to the latest release. We were using the 2012.3.1129.40 release previously.

We have been using the tileview control with a datatemplate assigned to the itemtemplate property and another datatemplate assigned to the contenttemplate. We also modified the the style of the tileview.

Before the upgrade the header of the tileviewitem was displaying properly now it is not displaying anything. The datatemplate is not being applied and the styling is not being applied. 

What changes have been done between the two release that could of caused this to work in the previous release but not work in the current release? 
 
This is the style we are applying: The templates are applied in code behind to the tileview itself.
    <Style x:Key="TileViewItemHeaderStyle" TargetType="{x:Type telerikNavigation:TileViewItemHeader}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerikNavigation:TileViewItemHeader}">
                    <Grid Margin="0 0 0 -2">
                        <Border x:Name="GripBarElement" Background="Transparent">
                            <ContentPresenter x:Name="HeaderElement" HorizontalAlignment="Stretch" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding HeaderTemplate}" />
                        </Border>
                        <telerik:RadToggleButton x:Name="MaximizeToggleButton" Command="telerikNavigation:TileViewCommands.ToggleTileState" InnerCornerRadius="0">
                            <telerik:RadToggleButton.Style>
                                <Style TargetType="{x:Type telerik:RadToggleButton}">
                                    <Setter Property="VerticalAlignment" Value="Center" />
                                    <Setter Property="HorizontalAlignment" Value="Right" />
                                    <Setter Property="Height" Value="16" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type telerik:RadToggleButton}">
                                                <Grid>
                                                    <Image x:Name="RestoreIcon" Source="pack://application:,,,/PulseInc.Resource;component/Icon_16/MaximizeWindow_02.png" Width="16" Height="16" ToolTip="Maximize" telerik:LocalizationManager.ResourceKey="TileViewItemMaximizeText" HorizontalAlignment="Right" VerticalAlignment="Top" Opacity="0.6"/>
                                                    <Image x:Name="BackIcon" Source="pack://application:,,,/PulseInc.Resource;component/Icon_16/MinimizeWindow_02.png" Width="16" Height="16" ToolTip="Restore" telerik:LocalizationManager.ResourceKey="TileViewItemMinimizeText" HorizontalAlignment="Right" VerticalAlignment="Top" Opacity="0.6" Visibility="Collapsed"/>
                                                </Grid>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="True">
                                                        <Setter TargetName="RestoreIcon" Property="Opacity" Value="1" />
                                                        <Setter TargetName="BackIcon" Property="Opacity" Value="1" />
                                                    </Trigger>
                                                    <Trigger Property="IsPressed" Value="True" />
                                                    <Trigger Property="IsChecked" Value="True">
                                                        <Setter TargetName="RestoreIcon" Property="Visibility" Value="Collapsed" />
                                                        <Setter TargetName="BackIcon" Property="Visibility" Value="Visible" />                                                        
                                                    </Trigger>
                                                    <DataTrigger Binding="{Binding Path=MaximizeMode, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadTileView}}}" Value="Zero">
                                                        <Setter TargetName="RestoreIcon" Property="Visibility" Value="Hidden"/>
                                                        <Setter TargetName="BackIcon" Property="Visibility" Value="Hidden"/>
                                                    </DataTrigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </telerik:RadToggleButton.Style>
                        </telerik:RadToggleButton>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="TileState" Value="Maximized">
                            <Trigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="MaximizeToggleButton" Storyboard.TargetProperty="IsChecked">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="MaximizeToggleButton" Storyboard.TargetProperty="IsChecked">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>False</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
 
    <!--RadTileViewItem style defined as implicit style to avoid warning at runtime (output window) -->
    <Style TargetType="{x:Type telerik:RadTileViewItem}">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="BorderBrush" Value="#FFB0B1B0" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="5" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type telerik:RadTileViewItem}">
                    <Grid>
                        <Border x:Name="outerBorder" Margin="{TemplateBinding Padding}" BorderBrush="LightGray" BorderThickness="1" CornerRadius="0">
                            <Border.Style>
                                <Style>
                                    <Style.Triggers>
                                        <Trigger Property="Border.IsMouseOver" Value="true">
                                            <Setter Property="Border.Background" >
                                                <Setter.Value>                                                   
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                            <GradientStop Color="#FFC4D0EB" Offset="1"/>
                                                        </LinearGradientBrush>                                                   
                                                </Setter.Value>
                                            </Setter>
                                        </Trigger>
                                    </Style.Triggers>
                                </Style>
                            </Border.Style>
                            <Border x:Name="outerContainer" BorderBrush="White" BorderThickness="1"  Background="Transparent" CornerRadius="0">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <telerikNavigation:TileViewItemHeader x:Name="HeaderPart" HeaderTemplate="{TemplateBinding HeaderTemplate}" Style="{DynamicResource TileViewItemHeaderStyle}" />
                                    <Grid Grid.Row="1" Margin="5 0 5 2">
                                        <ContentPresenter x:Name="ContentElement" Grid.Row="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                    </Grid>
                                    <Rectangle x:Name="DisabledVisual" Grid.RowSpan="2" Fill="#99FFFFFF" RadiusX="4" RadiusY="4" Visibility="Collapsed" />
                                </Grid>
                            </Border>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                               <Setter TargetName="outerBorder" Property="BorderBrush" Value="#273B8B" />
                                <Setter TargetName="outerBorder" Property="Border.Background" >
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                            <GradientStop Color="#FFC4D0EB" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>                            
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="outerBorder" Property="BorderBrush" Value="#273B8B" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

This is the style we are applying:

Pavel R. Pavlov
Telerik team
 answered on 29 Oct 2013
2 answers
213 views
Is there a way to show the weeknumber in the GroupHeaderDateStringFormat.

I can now show the days of the week like this:
GroupHeaderDateStringFormat="{}Week: {0:d MMM} - {1:d MMM}"

But I would like to have the weeknumber instead.
Or is there an other way to show the weeknumbers?
Rieni De Rijke
Top achievements
Rank 1
 answered on 29 Oct 2013
1 answer
326 views
I have build a custom FilteringControl for my RadGridView and got it to work on the following way:

<telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn Header="Value" DataMemberBinding="{Binding Path=RowValue}"
       FilteringControl="{StaticResource ResourceKey=ViFilterControl}" />
</telerik:RadGridView.Columns>

My custom filtering control implements the IFilteringControl interface.

In our application there are many RadGridViews with many columns, so I want to make a kind of Style with ControlTemplate to force every filter to use my custom filter control, instead of implementing my custom filter control on every column definition.
The way I tried to solve my problem is:

<Style x:Key="FilteringControlStyle" TargetType="telerik:FilteringControl">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type Type=telerik:FilteringControl}">
                <wpfApplication1:FilterControl />
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>
<Style TargetType="{x:Type Type=telerik:FilteringControl}" BasedOn="{StaticResource ResourceKey=FilteringControlStyle}" />

When I press the funnel on the gridview column my custom filter shows up, but the list stays empty. The cause of this is that the Prepare method of the IFilterControl is never called.

What am I doing wrong?
Vanya Pavlova
Telerik team
 answered on 29 Oct 2013
2 answers
128 views
Hello,

We are looking to use your WCF controls for calculator in order to make a more customized calculator with historical tape and adding machine with some grid-based features where numbers and operators will be displayed on right-side of basic calculator. I was analyzing your controls and was interested to know if that would be possible for our development team to do such customizations to the calculator?

- C
Ivan Ivanov
Telerik team
 answered on 29 Oct 2013
4 answers
315 views
Hi,
 
   I didn't want docking for the floating window(Tool Window). Is there any solution to do this?


With Thanks,
M.Vinnarasi
Vinnarasi
Top achievements
Rank 1
 answered on 29 Oct 2013
2 answers
261 views
Hi,

I want to set the care position to the selection end.
How to do it.

Regards
Ajita
Ajita
Top achievements
Rank 1
 answered on 29 Oct 2013
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?