Telerik Forums
UI for WPF Forum
17 answers
814 views
Hello,

Is it possible to get Silverlight Movie Player ported to WPF ?
Pavel R. Pavlov
Telerik team
 answered on 20 Feb 2015
19 answers
352 views
Some of my users are seeing the group headers and aggregate functions get out of sync in a grid after expanding and collapsing a couple of times.  Groups will show the key and the details from that group but the aggregate results from another group.

This grid uses a group header template and the collapse all/ expand all functionality is in code using ExpandAllGroups() and CollapseAllGroups().  Is this a known issue?  (I am having trouble duplicating this on my machine but I have seen it happen on other machines)

Here is xaml for the grid:

<telerik:RadGridView DockPanel.Dock="Top" x:Name="grdAccrual" ItemsSource="{Binding EnterpriseAllocationRecords}" AutoGenerateColumns="False"
                                         IsFilteringAllowed="False" ShowGroupPanel="False" SelectionMode="Extended" ShowInsertRow="False" 
                                         ActionOnLostFocus="CommitEdit"  CanUserInsertRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False"
                                         IsReadOnly="False" CanUserFreezeColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False"
                                         RowIndicatorVisibility="Collapsed" AutoExpandGroups="True" EditTriggers="F2,CellClick"
                                         ScrollViewer.VerticalScrollBarVisibility="Auto" RowEditEnded="grdAccrual_RowEditEnded"
                                        RowHeight="27">
              
            <telerik:RadGridView.Columns>
                <!--<telerik:GridViewDataColumn Header="ATIG"  CellStyle="{StaticResource LeftAlignCell}" DataMemberBinding="{Binding TransactionCode}"  Width="65" IsReadOnly="True"></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Description"  CellStyle="{StaticResource LeftAlignCell}" DataMemberBinding="{Binding TransactionDescription}" IsReadOnly="True" Width="*" />-->
                <telerik:GridViewDataColumn Header="Ent" CellStyle="{StaticResource LeftAlignCell}" DataMemberBinding="{Binding EnterpriseCode}" IsFilterable="False" IsReadOnly="True" Width="50" />
                <telerik:GridViewDataColumn Header="Ent Desc" CellStyle="{StaticResource LeftAlignCell}" DataMemberBinding="{Binding EnterpriseDescription}" IsFilterable="False" IsReadOnly="True" Width="350" />
                <telerik:GridViewDataColumn Header="Cash/Inv" DataMemberBinding="{Binding SuggestedAccrualAmount}" DataFormatString="{}{0:f2}" IsFilterable="False" IsReadOnly="True" Width="70" >
                    <!--<telerik:GridViewDataColumn.Header>
                        <TextBlock Text="Cash/Inv Accrual" TextWrapping="Wrap" />
                    </telerik:GridViewDataColumn.Header>-->
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="%" DataMemberBinding="{Binding AllocationPercent}" DataFormatString="{}{0:p2}" IsFilterable="False" Width="60">
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>                            
                            <telerikInput:RadMaskedNumericInput x:Name="txtAllocationPercent" Mask="p3.2" 
                                                                SpinMode="None" IsClearButtonVisible="False" SelectionOnFocus="SelectAll"
                                                                KeyboardNavigation.TabNavigation="Local" TextMode="PlainText"                                                                
                                                                Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}"  
                                                                 >
                                <telerikInput:RadMaskedNumericInput.Value>
                                    <Binding Path="AllocationPercent" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
                                        <Binding.ValidationRules>
                                            <imKASHelper:PercentValidationRule Min="-100.00" Max="100.00" />
                                        </Binding.ValidationRules>
                                    </Binding>
                                </telerikInput:RadMaskedNumericInput.Value>
                            </telerikInput:RadMaskedNumericInput>
  
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Units" DataMemberBinding="{Binding Units}" DataFormatString="{}{0:f2}" IsFilterable="False" IsReadOnly="True" Width="70" ></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Header="Weight" DataMemberBinding="{Binding Weight}" DataFormatString="{}{0:f2}" IsFilterable="False" IsReadOnly="True" Width="70" ></telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Amount}" DataFormatString="{}{0:f2}" IsFilterable="False" Width="70" >
                    <telerik:GridViewDataColumn.Header>
                        <TextBlock Text="Amount" TextWrapping="Wrap" />
                    </telerik:GridViewDataColumn.Header>
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerikInput:RadMaskedNumericInput x:Name="txtAmount" Mask="#11.2" 
                                                                SpinMode="None" IsClearButtonVisible="False" SelectionOnFocus="SelectAll"
                                                                KeyboardNavigation.TabNavigation="Local" TextMode="PlainText"                                                                
                                                                Validation.ErrorTemplate="{StaticResource TextBoxErrorTemplate}"  
                                                                 >
                                <telerikInput:RadMaskedNumericInput.Value>
                                    <Binding Path="Amount" Mode="TwoWay" UpdateSourceTrigger="LostFocus">
                                        <Binding.ValidationRules>
                                            <imKASHelper:DoubleValidationRule Min="-10000000000.00" Max="10000000000.00" />
                                        </Binding.ValidationRules>
                                    </Binding>
                                </telerikInput:RadMaskedNumericInput.Value>
                            </telerikInput:RadMaskedNumericInput>
  
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.GroupRowStyle>
                <Style TargetType="telerik:GridViewGroupRow">
                    <Setter Property="ShowHeaderAggregates" Value="False"></Setter>                    
                </Style>
            </telerik:RadGridView.GroupRowStyle>
  
            <telerik:RadGridView.GroupHeaderTemplate>                
                <DataTemplate>
                    <StackPanel Orientation="Horizontal" Margin="0,0" Height="45">
                        <TextBlock Text="{Binding Group.Key}" Margin="0,0,0,2" Width="200" />                        
                        <telerik:AggregateResultsList ItemsSource="{Binding AggregateResults}" VerticalAlignment="Center">
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Vertical" VerticalAlignment="Center">
                                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Caption}" Width="90" />
                                        <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding FormattedValue}" Width="90" Style="{StaticResource EnterpriseStatusStyle}" />
                                    </StackPanel>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </telerik:AggregateResultsList>
                    </StackPanel>
  
                </DataTemplate>
            </telerik:RadGridView.GroupHeaderTemplate>
            <telerik:RadGridView.GroupDescriptors>
                <telerik:GroupDescriptor x:Name="TransactionGroup" Member="TransactionGroup" SortDirection="Ascending" >
                    <telerik:GroupDescriptor.AggregateFunctions>
                        <telerik:MinFunction Caption="Cash" SourceField="CashTotal" ResultFormatString="{}{0:0.00}"  />
                        <telerik:MinFunction Caption="Beg Inv" SourceField="BegInvTotal" ResultFormatString="{}{0:0.00}"  />
                        <telerik:MinFunction Caption="End Inv" SourceField="EndInvTotal" ResultFormatString="{}{0:0.00}"  />
                        <telerik:MinFunction Caption="Beg Acc" SourceField="BegAccruedTotal" ResultFormatString="{}{0:0.00}"  />
                        <telerik:MinFunction Caption="End Acc" SourceField="EndAccruedTotal" ResultFormatString="{}{0:0.00}"  />
                        <telerik:MinFunction Caption="Accrual" SourceField="AccrualAmount" ResultFormatString="{}{0:c2}"  />
                        <telerik:SumFunction Caption="Ent Amt" SourceField="Amount" ResultFormatString="{}{0:c2}"  />
                        <local:EnterpriseDifferenceFunction Caption="Diff" ResultFormatString="{}{0:0.00}" />
                    </telerik:GroupDescriptor.AggregateFunctions>
                </telerik:GroupDescriptor>
            </telerik:RadGridView.GroupDescriptors>
        </telerik:RadGridView>

Stefan
Telerik team
 answered on 20 Feb 2015
3 answers
293 views
Hello. I want to implement future to draw shapes at runtime. In your docs are described, how to draw custom shapes or connections, but there are no info how to paint predefined shapes (Rectangles, Ellipses, Containers, etc.). This future is available only by drag and drop. But how  I can set draw (paint mode) dor mouse, like in MsPaint

http://joxi.ru/82Qqyg0spOaj2d
Pavel R. Pavlov
Telerik team
 answered on 20 Feb 2015
1 answer
136 views
I have some .xml files that are packages of some classes. I want to show those classes in telerik wpf diagrams control as a class diagram.
What is the best way of displaying class diagrams in WPF from .xml files? It should also populate diagrams automatically, that there is a minimum number of intersections in connections. 

Thanks,
Martin Ivanov
Telerik team
 answered on 20 Feb 2015
3 answers
111 views
Good morning,
i was just taking a deeper look at the two controls and it works realy well.
So I have two little questions:
- When i give my pdfviewer in xaml a documentsource, does it call my custom decode filter? Or i need to load/reload my pdf?
- What are the standard decode filters for pdfviewer? I mean if i have no custom filter implemented which decode filter is used?

Hope you can help me,

mfg David
David
Top achievements
Rank 1
 answered on 20 Feb 2015
11 answers
1.0K+ views

Hi,

 

I want to have a footer in one of my gridview columns that has two rows: one containing a textbox bound to a field in model view, and the second row displays the sum of items in that column.

 

---------------------------------

Total:  {text box}

                <sum>

---------------------------------

 

I have followed the suggestion from another thread to have a style for the footer to set the binding, and then reference that style on the column. 

 

<Style x:Key="SalesTotalStyle" TargetType="telerik:GridViewFooterCell">
    <Setter Property="ContentTemplate">
        <Setter.Value>
            <DataTemplate>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Width="75" TextAlignment="Right" FontWeight="Bold"  Text="{Binding Path=DataContext.SalesSum,
                               RelativeSource={RelativeSource AncestorType=telerik:GridView}}" />
                    <TextBox Grid.Row="1" Text="{Binding Path=DataContext.ExpetedSalesTotal,                               
                       RelativeSource={RelativeSource AncestorType=telerik:GridView}}" Width="75" TextAlignment="Right"/>
                </Grid>
            </DataTemplate>
        </Setter.Value>
    </Setter>
</Style>


This works great and it does display y the data properly in the textbox.  However, how  can I add an aggregate function in the style section?? 
I undetstand aggregate functions will not show if the footer is set.  I have also tried to create a sum property (SalesSum) that reruns the sum of underlying data, whoever it doesn’t get refreshed in the grid as the user enters items in the column.  Any suggestion?

 



Cheers
Eliot
Top achievements
Rank 1
 answered on 20 Feb 2015
7 answers
169 views
Hello Telerik,

is the a way to use a QueryableEntityCollectionView object (bounded to a RadGridView) with EF6 which has a DBContext instate of ObjectContext?
I'm chaining my Telerik application form EF 4 to EF 6.
Or can you give me a link to a simple GridView example using Entity Framework 6?

Regards Uwe
Maya
Telerik team
 answered on 20 Feb 2015
2 answers
131 views
Hello,

for some reason, the manipulation adorner is offset relative to the shape after selecting a rotated shape (see attached image).
When selecting a shape with rotation angle = 0 and while rotating it, the adorner stays at the expected position.

What could be the cause for this behavior?

Alex
Alexander
Top achievements
Rank 1
 answered on 19 Feb 2015
1 answer
109 views
I have a spreadsheet control with data and the headers frozen by code.

Then any filter is applied on any column, that works. But when the filter is cleared by
the option “Clear Filter” some rows are frozen in addition to the previous
frozen header. In some cases, after clearing the filter, all the visible rows
are frozen and scroll does not move anything…

Any help?
Anna
Telerik team
 answered on 19 Feb 2015
3 answers
187 views
Hello,
I have some questions,

1- How can I control the MouseHover in RadDiagramShape from code behind not from xaml?

2- How can I keep only one connector for RadDiagramShape?
 I tried 
  MyShape.Connectors.RemoveAt(1);
  MyShape.Connectors.RemoveAt(0);
It worked 
Is there no easier way or a way to remove them all? or I can keep the middle one(Center Connector)?

Thank you.
Pavel R. Pavlov
Telerik team
 answered on 19 Feb 2015
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?