Telerik Forums
UI for WPF Forum
8 answers
293 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
57 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
47 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
623 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
73 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
156 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
1 answer
39 views
Hi, when using the grouping feature can I select the grouping row..
In other words can I have the Grouping Row have cells that I can interact with ?

Thanks
kristján.
Vlad
Telerik team
 answered on 03 Jan 2012
3 answers
108 views
I want to change all the grid cells' background. Using SpecialSlotStyleSelector is the only way. Is that true?
I have setted  StretchAppointments="True" in TimelineViewDefinition. There are still some blanks at the top and bottom (see the attach) for the appoinement item. How can I grid rid of them.
Thanks.
Merry Christmas!

Dani
Telerik team
 answered on 03 Jan 2012
1 answer
53 views
If I just want to have the right page, would that be possible?
Petar Mladenov
Telerik team
 answered on 03 Jan 2012
1 answer
100 views
Hi,

I've reviewing the new ChartView control (from a background of using the previous Chart control) and I'm wondering what is future plan for displaying chart legends? The existing Chart control had built-in support for legends, however I'm noticed that the ChartView examples manually build legends. Are there future plans for a related control to display a legend or provide some support for legends in the ChartView control (I personally like the idea of keeping legends out of the ChartView control to keep the control as light as possible) or should we as developers expect to build our own legends? I just want to understand Telerik's future plans so I know whether to invest time in building my own legend control or simply build something quick because Telerik will provide support for legends in some form in a future release.

Kind regards,
Dave.
Giuseppe
Telerik team
 answered on 03 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?