Telerik Forums
UI for WPF Forum
2 answers
112 views
Hello

I have only few items that I wanna add to backstage and all are simple buttons with commands. I don't need the right side of backstage. Is there a way to hide it?
Krzysztof
Top achievements
Rank 1
 answered on 04 Jan 2012
2 answers
177 views
Hi,

We are using some RadGridView in multiple RadDocking Panes.
Thoses grids have over 1000 items and we got an serious performance issue when switch between panes (hosted in DocumentHost). It takes about 1-2sec before displaying the pane.

I don't understand since in Q2 2011 it works pretty much. But now in Q3 2011 it's really slow.

The grid is quite simple :

<Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="500"/>
                    </Grid.RowDefinitions>
                    <GroupBox Header="Recherche"  Margin="5">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="Filtre" Margin="5"/>
                            <TextBox x:Name="txtFilter" Margin="5" Width="200"/>
                        </StackPanel>
                    </GroupBox>
 
                    <telerik:RadGridView Grid.Row="1" Height="500" ShowGroupPanel="False" IsFilteringAllowed="False" CanUserFreezeColumns="False" CanUserReorderColumns="False" ValidatesOnDataErrors="None" FilterTextBox:TextBoxFilterBehavior.TextBox="{Binding ElementName=txtFilter}"  SelectedItem="{Binding SelectedItem}" IsReadOnly="True" RowIndicatorVisibility="Collapsed"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemsSource="{Binding ItemList}" AutoGenerateColumns="False">
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="MouseDoubleClick" >
                                <ei:CallMethodAction TargetObject="{Binding}"  MethodName="EditCommand"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
 
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Width="100" Header="Code" DataMemberBinding="{Binding Code}" UniqueName="Code"/>
                            <telerik:GridViewDataColumn Width="450" Header="Désignation Longue" DataMemberBinding="{Binding LongName}"/>
                            <telerik:GridViewCheckBoxColumn Width="80" Header="Bloqué" DataMemberBinding="{Binding IsLocked}" UniqueName="IsLocked"/>
                        </telerik:RadGridView.Columns>
                         
                    </telerik:RadGridView>
                </Grid>

I've tested to remove the GridViewCheckBoxColumn, without luck.

When me application window is sized to the minimum in order to display only 1 row in the grid, it's really fast, but in full screen (displaying about 30 items visible) it's really slow...

Any help ?

Thanks.
Bernard
Top achievements
Rank 1
 answered on 04 Jan 2012
1 answer
122 views
How to change the gridview selected row backcolor,forecolor and font style.
Vlad
Telerik team
 answered on 04 Jan 2012
0 answers
227 views
Hi,

I'm wondering whether there is such a Control in the WPF suite to enable me to view powerpoint / openoffice impress slideshows in my WPF application. If not, does anyone has any suggestions how to go about doing this within my application, rather than spawning the powerpoint viewer as a separate full screen application? Thanks for your help.
Ring Lee
Top achievements
Rank 1
 asked on 04 Jan 2012
8 answers
318 views
Hello, I am having some serious issues here.

I have defined this grid:

<telerik:RadGridView
    x:Name="something"
    ItemsSource="{Binding Events}"
    telerik:Theming.Theme="Windows7"
    ShowGroupPanel="False"
    AutoGenerateColumns="False"
    ScrollMode="Deferred">
    <telerik:RadGridView.ScrollPositionIndicatorTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding ScrollIndicator}" />
        </DataTemplate>
    </telerik:RadGridView.ScrollPositionIndicatorTemplate>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ID}" Width="100" />
        <!--<telerik:GridViewDataColumn Header="Artikkel" DataMemberBinding="{Binding Article}" />
        <telerik:GridViewDataColumn Header="Sats" DataMemberBinding="{Binding Batch}" />
        <telerik:GridViewDataColumn Header="Serienummer" DataMemberBinding="{Binding Serial}" />-->
        <telerik:GridViewDataColumn Header="Operasjon" DataMemberBinding="{Binding EventType}" Width="150" />
        <telerik:GridViewDataColumn Header="Startet" DataMemberBinding="{Binding Started}" Width="100" />
        <telerik:GridViewDataColumn Header="Avsluttet" DataMemberBinding="{Binding Ended}" Width="100" />
        <telerik:GridViewDataColumn Header="Status" Width="100">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Status}" HorizontalAlignment="Left" FontWeight="Bold" Foreground="{Binding StatusColor}" />
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn Header="Bruker" DataMemberBinding="{Binding EmployeeID}" Width="100" />
        <telerik:GridViewDataColumn Header="Informasjon" DataMemberBinding="{Binding Information}" Width="300" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

Using a bog standard ListView, this was performing just fine - but now I am having UI hangs while scrolling (when scrollmode was realtime) and I get a black background inside the window border while resizing..

What am I missing?

  // Regards, Morten
Morten Nilsen
Top achievements
Rank 1
 answered on 03 Jan 2012
1 answer
78 views
I have a collection view source with a grouping to which a GridView is bound.  While scrolling, the group header scrolls with the other records.  Is it possible to have the grouped header fixed while it's records are visible in the visibile scroll area?
Vanya Pavlova
Telerik team
 answered on 03 Jan 2012
4 answers
61 views
Hello, I have been poking around the documentation, trying to find out if "ShowDistinctFilters" does what I want..
However, all I am able to find is "Gets or sets a value indicating whether this column will show distinct filters.".
That is taken from http://www.telerik.com/help/wpf/p_telerik_windows_controls_gridviewcolumn_showdistinctfilters.html

Is there a more helpful documentation available somewhere I am not finding?

What I want, by the way, is making a DateTime column not show every single time that is listed in the column with a checkbox, but still give the user the ability to filter using a date/time picker (from-to)

  // Regards, Morten
Morten Nilsen
Top achievements
Rank 1
 answered on 03 Jan 2012
6 answers
682 views
After adding or removing rows from a DataTable, clicking on a row throws a RowNotInTableException.

I can perform other actions such as selecting the row using the row selector checkbox, but if I click on the row anywhere outside the checkbox, I get the error (looks like its on the cell mouse down event).

The error sometimes doesn't get thrown but usually does (threading issue?).

System.Data.RowNotInTableException was unhandled by user code
  Message=This row has been removed from a table and does not have any data.  BeginEdit() will allow creation of new data in this row.
  Source=System.Data
  StackTrace:
       at System.Data.DataRow.GetDefaultRecord()
       at System.Data.DataRow.get_Item(String columnName)
       at System.Data.DataRowExtensions.Field[T](DataRow row, String columnName)
       at lambda_method(Closure , DataRow )
       at Telerik.Windows.Data.FuncExtensions.<>c__DisplayClass1`2.<ToUntypedFunc>b__0(Object item) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Extensions\FuncExtensions.cs:line 24
       at Telerik.Windows.Data.QueryableCollectionViewGroup.FindLastLevelGroupByItem(Object item) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Data\Grouping\QueryableCollectionViewGroup.cs:line 536
       at Telerik.Windows.Controls.GridView.GridViewDataControl.GetRowForItem(Object item, Boolean forceGroupExpand) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3226
       at Telerik.Windows.Controls.GridView.GridViewDataControl.get_CurrentCell() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 764
       at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 404
       at System.Windows.UIElement.OnMouseLeftButtonDownThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
  InnerException:
Andrew
Top achievements
Rank 1
 answered on 03 Jan 2012
2 answers
87 views
I have a pretty simple use case: I have a grid populated from a database, with a column for each field.

I want the user to be able to add new records, and to edit existing records.

My problem is the fields that are part of the primary key.  I need these to be editable, when the user is adding a new record, but to not be editable, when the user is editing an existing record.

Seems like a pretty common problem, but I've not been able to figure out how to do it.

If it matters, I'm using MVVM and my records are in an ObservableCollection.  My ViewModel picks up on changes to the collection with a NotifyCollectionChangedEventHandler on the collection, and changes to individual records with a PropertyChangedEventHandler on each record.  I don't actually have any GUI events being handled in the codebehind.
Jeff
Top achievements
Rank 1
 answered on 03 Jan 2012
3 answers
177 views
Hi,

I'm using the new RadRadialGauge (Q3 2011 SP1) to build a user control to visualize a valve. This valve should show a perfectly horizontal line if the valve is completely closed with a value of 0 and a perfectly vertical line if the valve is completely open with a value of 100. If the valve has a value of 50, the line will be a perfect diagonal line pointing north-west to south-east.

I'm created the following user control that works:
<UserControl
    x:Class="ucValve"
    d:DesignHeight="48"
    d:DesignWidth="48"
    mc:Ignorable="d">
    <Grid>
        <telerik:RadRadialGauge>
            <telerik:RadRadialGauge.InnerBackground>
                <SolidColorBrush />
            </telerik:RadRadialGauge.InnerBackground>
            <telerik:RadRadialGauge.InnerBorderBrush>
                <SolidColorBrush />
            </telerik:RadRadialGauge.InnerBorderBrush>
            <telerik:RadRadialGauge.OuterBackground>
                <SolidColorBrush />
            </telerik:RadRadialGauge.OuterBackground>
            <telerik:RadRadialGauge.OuterBorderBrush>
                <SolidColorBrush />
            </telerik:RadRadialGauge.OuterBorderBrush>
            <telerik:RadialScale
                x:Name="Scale"
                MajorTickRelativeHeight="0"
                MajorTicks="0"
                Max="100"
                Min="0"
                Radius="1.25"
                StartAngle="180"
                SweepAngle="90">
                <telerik:RadialScale.Indicators>
                    <telerik:Needle
                        x:Name="Needle"
                        BorderBrush="Black">
                        <telerik:Needle.Style>
                            <Style TargetType="{x:Type telerik:Needle}" >
                                <Setter Property="telerik:ScaleObject.Location" Value="Inside" />
                                <Setter Property="telerik:ScaleObject.RelativeWidth" Value="0.05" />
                            </Style>                           
                        </telerik:Needle.Style>
                    </telerik:Needle>
                    <telerik:Pinpoint
                        Background="Black"
                        BorderThickness="1">
                        <telerik:Pinpoint.Style>
                            <Style
                                TargetType="{x:Type telerik:Pinpoint}">
                                <Setter Property="telerik:ScaleObject.Location" Value="Inside" />
                                <Setter Property="telerik:ScaleObject.RelativeHeight" Value="0.2" />
                                <Setter Property="telerik:ScaleObject.RelativeWidth" Value="0.2" />
                            </Style>
                        </telerik:Pinpoint.Style>
                    </telerik:Pinpoint>
                </telerik:RadialScale.Indicators>
                <telerik:RadialScale.LabelTemplate>
                    <DataTemplate />
                </telerik:RadialScale.LabelTemplate>
            </telerik:RadialScale>
        </telerik:RadRadialGauge>
    </Grid>
</UserControl>
with the following code behind:
Imports System.ComponentModel
 
Public Class ucValve
 
    Public Sub New()
        InitializeComponent()
        Value = valueDefaultValue
    End Sub
 
#Region "Properties"
    Private Const valueDefaultValue As Double = 0
 
    <Category("Common"), DefaultValue(valueDefaultValue)>
    Public Property Value As Double
        Get
            Return Needle.Value
        End Get
        Set(ByVal value As Double)
            Needle.Value = value
        End Set
    End Property
 
    Public ReadOnly Property Maximum As Double
        Get
            Return Scale.Max
        End Get
    End Property
 
    Public ReadOnly Property Minimum As Double
        Get
            Return Scale.Min
        End Get
    End Property
#End Region
End Class

This successfully renders the top left half of the valve. To render the bottom right half of the value, I change the XAML:
<telerik:Needle
    x:Name="Needle"
    BorderBrush="Black">
to:
<telerik:Needle
    x:Name="Needle"
    BorderBrush="Black"
    TailHeight="1">

While the user control successfully displays the bottom right half of the valve, when I embed this new user control into a window, I get the following error message:

An Unhandled Exception has occurred
'-INF' is not a valid value for property 'Height'.
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.Gauge.Needle.Resize() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\Indicators\Needle.cs:line 96
   at Telerik.Windows.Controls.Gauge.ScaleObject.OnValueChanged(DependencyObject source) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\ScaleObject.cs:line 399
   at Telerik.Windows.Controls.Gauge.InteractiveIndicator.RefreshIndicator() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\Indicators\InteractiveIndicator.cs:line 237
   at Telerik.Windows.Controls.Gauge.InteractiveIndicator.OnValueChanged(Double oldValue, Double newValue) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\Indicators\InteractiveIndicator.cs:line 190
   at Telerik.Windows.Controls.Gauge.GraphicIndicator.InternalValuePropertyChangedHandler(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\Indicators\GraphicIndicator.cs:line 644
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.Gauge.IndicatorHelper.RefreshInternalValue(GraphicIndicator indicator, Double value) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\Indicators\IndicatorHelper.cs:line 223
   at Telerik.Windows.Controls.Gauge.IndicatorHelper.CoerceValueProperty(DependencyObject source, Object value) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\Indicators\IndicatorHelper.cs:line 72
   at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, Object controlValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, Boolean skipBaseValueChecks)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.Gauge.GraphicIndicator.set_Value(Double value) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Gauge\Indicators\GraphicIndicator.cs:line 385
   at AlentControls.ucValve.set_Value(Double value) in C:\Utveckling\Alent\AlentControls\ucValve.xaml.vb:line 19
   at AlentControls.ucValve..ctor() in C:\Utveckling\Alent\AlentControls\ucValve.xaml.vb:line 7

If I remove setting the TailHeight property to 1, it works. If I set the TailHeight property to any value, the above unhandled exception occurs.

Am I doing something wrong or is this an issue with the new RadRadialGauge (specifically, the Needle object).

Kind regards,
Dave.
Sia
Telerik team
 answered on 03 Jan 2012
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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?