Telerik Forums
UI for WPF Forum
3 answers
109 views
Hi,

I have a chart with multiple series on it, representing time (x) vs speed (y) The 1st is supposed to span the entire length of the 'shift' and be drawn at 100 (%). The other series (there maybe many) will have points in between the 1st series' start and end time. However, when I do the data binding I get some strange visual results. The time line goes from e.g. 15:00:00 to 15:09:00 to 15:00:01, 15:00:02, etc.
It looks like the chart does not take into account that it's actually the same timespan for both series. I can supply the sample application if required. Any help would be appreciated.

Thanks!
Geoffrey
Top achievements
Rank 1
 answered on 06 Dec 2011
5 answers
118 views
Hi there.
Just started evaluating the product but am unable to quickly figure out how to make a chart dockable.  Can someone direct me to the correct implementation please.

Maurice
Konstantina
Telerik team
 answered on 06 Dec 2011
3 answers
123 views
I'm a bit confused on what my options would be for accomplishing the following:



Basically, I need 2 piecharts with 1 legend, and the additional data fields associated with the legend items you see in the pic.  The 2 charts and legend must all have the same colors for the data/series items.

I've read previous posts about specifying colors for the chart legend and series mappings by creating palettes and doing codebehind to assign colors to both series items and legend items manually.  However, I'm not sure if either of these fit with what I'm tasked to do.
 I'm not sure if I can add additional data in the legend (i've seen that there is a legend controltemplate but not a datatemplate) via templating or adding a gridview control to it. If i can't inject additional data into the legend, is there a way i can bind to the pie item colors?

Any advice would be appreciated.  Thanks.
Nikolay
Telerik team
 answered on 06 Dec 2011
1 answer
174 views
Hello,

I have another UriImageProvider question. I have a series of images that my user can select from (via a drop down). When they select the image they want, I need my RadMap's UriImageProvider to grab the currently selected image information and display the image. Preferably, I would use the Byte Array that I have in memory to build the image on the fly and pass it to the provider. Worse case, I can write it to disk but I would rather avoid this. I can't seem to see a way to do this with Uri="{Binding...}". Any examples out there on how to dynamically change the Uri of the UriImageProvider?


Cheers,
Seth
Andrey
Telerik team
 answered on 06 Dec 2011
3 answers
189 views
Good afternoon.

I have some XAML that worked fine with release 2011.1.502.35, but I want to upgrade to the latest version (2011.3.11.16.0).

Unfortunately, I have a number of GridViews with GridViewDataColumn fields bound to nullable DateTime fields like this -

 

  <telerik:RadGridView.Columns>
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Precedence}" Header="Precedence" IsReadOnly="True" />
    <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description" />
            <telerik:GridViewDataColumn DataMemberBinding="{Binding OffenceFromDate}" Header="From Date"/>
            <telerik:GridViewDataColumn DataMemberBinding="{Binding OffenceToDate}" Header="To Date"/>
            <telerik:GridViewComboBoxColumn ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=Page}, Path=DataContext.Queues}"
                                    SelectedValueMemberPath="OID"
                                    DataMemberBinding="{Binding AllocationQueue}"
                                    DisplayMemberPath="Name"
                                    Header="Assign To Queue"
                                    IsComboBoxEditable="True" />
  </telerik:RadGridView.Columns>           
</telerik:RadGridView>

When I load up a grid containing a row that contains a null value in either OffenceFromDate or OffenceToDate, I'm now getting the following exception -

Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(System.Windows.Size)

System.NullReferenceException occurred
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Data
  StackTrace:
       at Telerik.Windows.Data.Expressions.UnboxT`1.NullableField[TElem](Object value) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Data\Expressions\MemberAccess\Unbox.cs:line 39
  InnerException:

Is there any way around this? As I mentioned earlier, the older release was fine with these records.

Thanks for your time.

Paul
Paul
Top achievements
Rank 1
 answered on 06 Dec 2011
1 answer
164 views
When the ItemsSource (ObservableCollection) is empty (Count = 0) calling BeginInsert does cause the AddingNewDataItem event to fire.  This works fine when ItemsSource has at least 1 item.
Maya
Telerik team
 answered on 06 Dec 2011
1 answer
100 views
Is there a way in XAML to bind a property of a filterdescriptor for when it's active or not.  I'd like to define a filterdescriptor in XAML and bind whether or not it's active (i.e. applied to the gridview) to a MVVM property.
Vlad
Telerik team
 answered on 06 Dec 2011
2 answers
323 views
Hi,

Using the GridView definition below I get a Index out of bounds exception. This was working in 2011 Q2 but when I upgraded to Q3 I get this when I launch the application.
Any help would be much appreciated.

Thank you,

Vlad



The GridView:

<Telerik:RadGridView
                    AutoGenerateColumns="False"
                    Name="ItemGrid"
                    Telerik:StyleManager.Theme="{Binding Path=SelectedThemeName}" SelectionMode="Extended">
                    <Telerik:RadGridView.ItemsSource>
                        <Binding Path="CurrentDataSourceViewModelBindingList" Mode="TwoWay"/>
                    </Telerik:RadGridView.ItemsSource>
                    <Telerik:RadGridView.Columns>
                        
<!--                        <Telerik:GridViewMaskedTextBoxColumn
                            Header="Source"
                            DataMemberBinding="{Binding DataSourcePath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                            Width="*" />
-->

                        <Telerik:GridViewDataColumn
                            Header="Source"                            
                            DataMemberBinding="{Binding DataSourcePath}"
                            Width="*">
                            <Telerik:GridViewDataColumn.CellEditTemplate>
                                <DataTemplate>
                                    <TextBox Text="{Binding Path=DataSourcePath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                                </DataTemplate>
                            </Telerik:GridViewDataColumn.CellEditTemplate>
                        </Telerik:GridViewDataColumn>


                        <Telerik:GridViewDataColumn
                            Header="Custodian"                            
                            DataMemberBinding="{Binding Custodian}"
                            Width="*">
                            <Telerik:GridViewDataColumn.CellEditTemplate>
                                <DataTemplate>
                                    <TextBox Text="{Binding Path=Custodian, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                                </DataTemplate>
                            </Telerik:GridViewDataColumn.CellEditTemplate>
                        </Telerik:GridViewDataColumn>
                    </Telerik:RadGridView.Columns>
                </Telerik:RadGridView>


The Error:

System.ArgumentOutOfRangeException was unhandled by user code
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  Source=mscorlib
  ParamName=index
  StackTrace:
       at System.ThrowHelper.ThrowArgumentOutOfRangeException()
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at Telerik.Windows.Controls.GridViewColumnCollectionInternal.ColumnFromDisplayIndex(Int32 displayIndex) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewColumnCollectionInternal.cs:line 420
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.InitializeMeasureData() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 355
       at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size availableSize) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewCellsPanel.cs:line 301
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
       at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewRowItem.MeasureOverride(Size constraint) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewRowItem.cs:line 214
       at Telerik.Windows.Controls.GridView.GridViewHeaderRow.MeasureOverride(Size availableSize) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Rows\GridViewHeaderRow.cs:line 189
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride(Size constraint) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ScrollViewer\GridViewScrollViewer.cs:line 179
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
       at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Border.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.Controls.Control.MeasureOverride(Size constraint)
       at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size constraint) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 6969
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
       at System.Windows.Interop.HwndTarget.OnResize()
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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:
Vladimir Herisse
Top achievements
Rank 1
 answered on 05 Dec 2011
3 answers
151 views

I'm attempting (with limited success) to create a TreeView that contains a mixture of dynamic and static data.

You'll find my current best attempt at this below, however since I'm nesting TreeViews there is a side effect wherein it is possible to have multiple items within the parent TreeView selected.  When I've tried nesting TreeViewItems the results were not positive, i.e. only the parent level TreeViewItem in the ItemTemplate is displayed and space for it's children is created but nothing is output.

I would really like to know how to acheive my goal without resorting to specifying the entire menu in collections which I bind to the TreeView.

Thank you

<telerik:RadTreeView Width="225" HorizontalAlignment="Left" Background="Transparent" FontWeight="SemiBold">
            <telerik:RadTreeViewItem Header="Customer" Command="{Binding OpenCustomerCommand}"/>
            <telerik:RadTreeViewItem Header="Sites" Command="{Binding OpenSiteBrowserCommand}" ItemsSource="{Binding Sites}">
  
                <telerik:RadTreeViewItem.ItemTemplate>
                    <DataTemplate>
                              
                        <telerik:RadTreeView>
  
                            <telerik:RadTreeViewItem Header="{Binding Key}"
                                Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                Path=DataContext.OpenSiteCommand}" 
                                CommandParameter="{Binding Value}">
  
                                <telerik:RadTreeViewItem Header="Material Profiles" 
                                    Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                    Path=DataContext.OpenMaterialProfileBrowserCommand}" 
                                    CommandParameter="{Binding Value}"/>
  
                                <telerik:RadTreeViewItem Header="Prices" 
                                    Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                    Path=DataContext.OpenPriceBrowserCommand}" 
                                    CommandParameter="{Binding Value}"/>
  
                                <telerik:RadTreeViewItem Header="Orders"
                                    Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                    Path=DataContext.OpenOrderBrowserCommand}" 
                                    CommandParameter="{Binding Value}"/>
  
                                <telerik:RadTreeViewItem Header="Activity">
  
                                    <telerik:RadTreeViewItem Header="Collection"
                                        Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                        Path=DataContext.OpenActivityCollectionsBrowserCommand}" 
                                        CommandParameter="{Binding Value}"/>
  
                                    <telerik:RadTreeViewItem Header="Call Outs"
                                        Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                        Path=DataContext.OpenActivityCallOutBrowserCommand}" 
                                        CommandParameter="{Binding Value}"/>
  
                                    <telerik:RadTreeViewItem Header="Gate"
                                        Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                        Path=DataContext.OpenActivityGateBrowserCommand}" 
                                        CommandParameter="{Binding Value}"/>
  
                                    <telerik:RadTreeViewItem Header="One Off Charges"
                                        Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=view:WindowViewBase}, 
                                        Path=DataContext.OpenActivityOneOffChargeBrowserCommand}" 
                                        CommandParameter="{Binding Value}"/>
  
                                </telerik:RadTreeViewItem>
  
                            </telerik:RadTreeViewItem>
                        </telerik:RadTreeView>
                    </DataTemplate>
                </telerik:RadTreeViewItem.ItemTemplate>
  
            </telerik:RadTreeViewItem>
Petar Mladenov
Telerik team
 answered on 05 Dec 2011
1 answer
63 views
Can a chart legend be displayed outside of a chart area?  The reason is if i want to show 2 charts side by side and only one legend, the chart that displays the legend will have it's size decreased.  Hope that made sense. Thanks
Evgenia
Telerik team
 answered on 05 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?