Telerik Forums
UI for WPF Forum
8 answers
577 views
I am trying to get a gridviewcombobox to filter and it does not work as documented. 

The properties have different names than the combobox documentation and some properties are not the same as a combobox. 

I tried setting the edit panel style as suggested in the reply to another post, but when I do that the edit panel does not appear and the combo box does not function at all. I have the following code:

 <telerik:GridViewComboBoxColumn Header="Parent"
                                                IsComboBoxEditable="True"
                                                ItemsSource="{Binding AllFinishedProducts, Source={StaticResource finishedProduct}}"
                                                FilterMemberPath="PartNumber"
                                                DataMemberBinding="{Binding ParentId}"
                                                SelectedValueMemberPath="Id"                  
                                                DisplayMemberPath="PartNumber">

The current behavior is more like a search than a filter. How can I get a gridviewcomboboxcolumn to filter like a radcombobox?

Eric
Top achievements
Rank 1
 answered on 02 Apr 2015
5 answers
193 views
Hello there folks,

I have an issue with a RadGridView and GridViewNewRow.

I have a RadGridView bound to an Itemssource (ICollection). Every row is expandable with a DetailsTemplate for Read-Only and Edit. So far everything works fine. Problems arise when I enable the "NewRow" option of the GridView.

The GridViewNewRow uses the same DetailsTemplate as the Edit Template but for some strange reason the built-in ScrollViewer of RadGridView works differently for the GridViewNewRow. The content of the GridViewNewRow gets recognized and shown (all Height and Width properties are set to Auto/NaN), but the content is not scrollable, so if the new row gets activated near the bottom of the GridView, the content flows outside of the visible area and you have no possibility to focus it there.

Expanding the DetailsTemplate of the Read-Only or Edit Template works perfectly with the scrolling. So basically you can add a new row on the bottom of the GridView and you can only see half of the content, then you commit the row and go to edit mode of the same row (which uses exactly the same template) and you can scroll like a young god. I added two pictures showing the explained behavior, GridViewNewRow without the ScrollBar and GridViewRow with the ScrollBar, both using the same template with the same data, but one working and the other not so much.

I did some digging inside the properties and saw that the IScrollInfo.ExtentHeight of the RadGridView does not recognize the expanding of the Details Template of the GridViewNewRow while it does recognize the expanding of the GridViewRow. So there might be some error at this point. I attach an event handler to the "AddingNewDataItem" in the RadGridView to set the DataContext, but otherwise everything is out-of-the-box "Telerik" usage and I never enable/disable the ScrollViewer in any way.

Any ideas where the problem might be? Is there some property you have to set for GridViewNewRow?

Thanks !
Maya
Telerik team
 answered on 02 Apr 2015
5 answers
126 views
Hi,

Performances of ChartTrackBallBehavior isn't good when I work with a lot of series (20/30) with a lot of points (>20.000 each).
In effect I cant ensure conditions for a good implementation of "Get Closest" functions because my datapoints is always ordered.

Exists a strategy for inform series that Dataset is ordered or override GetClosest functions?

Thank's marc.
Petar Marchev
Telerik team
 answered on 02 Apr 2015
1 answer
168 views
i want to have a scroll to be added in the submenu item list.
if im making radmenuItem.DropDownHeight = 200, then i can achieve wat want. 
but issue arise when the submenu item are less(say2), then submenuitem list shows 2 submenu item and rest space is show blank, ie. it takes minumun height to the submenu item list as 200.

FUNCTION: 
  private void AddtoReporMenuItem_OnMouseEnter(object sender, MouseEventArgs e)
        {
            var treeViewModel = this.DataContext as TreeViewModel;
            if(radcontextMenu.Items.Count>2)
                radcontextMenu.Items.RemoveAt(2);
            RadMenuItem  reportItem = new RadMenuItem(){Header = "Add to Report"};
            RadMenuItem reportNamesItem;
            RadMenuGroupItem reportsList = new RadMenuGroupItem();
            if (treeViewModel.Reports != null)
            {
                foreach (var report in treeViewModel.Reports)
                {
                    reportNamesItem = new RadMenuItem();
                    reportNamesItem.Header = report.ReportName;
                    reportNamesItem.Click += (senderObj, eventargs) => reportItem_Click(senderObj, eventargs, report);
                    reportsList.Items.Add(reportNamesItem);
                }
               
                reportItem.Items.Add(reportsList);
                reportItem.DropDownHeight = 200;
                radcontextMenu.Items.Add(reportItem);
            }

        }




xaml:
   <telerik:RadContextMenu.ContextMenu>
                <telerik:RadContextMenu x:Name="radcontextMenu" MouseEnter="AddtoReporMenuItem_OnMouseEnter">
                    <telerik:RadMenuItem Header="{localization:Translate DeleteTxt}" Command="{Binding Path=DeleteChartDash}" />
                    <telerik:RadMenuItem Header="{localization:Translate ExportButton}">
                        <telerik:RadMenuItem Header="CSV" Command="{Binding Path=ExportCommand}" CommandParameter="ExportChart" />
                        <telerik:RadMenuItem Header="{localization:Translate ExportdataTxt}" Command="{Binding Path=ExportCommand}" CommandParameter="ExportData"  />
                        <telerik:RadMenuItem Header="{localization:Translate PowerPointTxt}" Command="{Binding Path=ExportCommand}" CommandParameter="ExportPPT"  />
                        </telerik:RadMenuItem>
                </telerik:RadContextMenu>
            </telerik:RadContextMenu.ContextMenu>




Kalin
Telerik team
 answered on 02 Apr 2015
2 answers
194 views
Hello

Is there a way to lock a radDiagramItem so the user won't be able to move it?

I've already disabled the item's dragging, but the user can still  change the position through Ctrl+Arrow Keys.
Maurício
Top achievements
Rank 1
 answered on 02 Apr 2015
1 answer
68 views
I am looking for option similar to 'Hide Field' available in Ajax on a field selected in pivot field list.
I  want the user to  be able to select a field in the pivotfieldlist. But then have an option to hide it from the pivot grid view.

At the moment I can hide a field using AutoGenerateField  which hides it completely from both pivotfieldlist and pivotgrid.
Kalin
Telerik team
 answered on 02 Apr 2015
1 answer
334 views
Can the RadListBox operate in a non-virtualized mode.  For my use-case, I need it to not be virtualized, which it is by default.
Nasko
Telerik team
 answered on 02 Apr 2015
1 answer
140 views
I received this exception when trying to dock a floating window. I have not been able to reproduce it since, however. Any suggestions of how I might track this down?


System.ArgumentNullException was unhandled
  HResult=-2147467261
  Message=Value cannot be null.
Parameter name: element
  Source=Telerik.Windows.Controls
  ParamName=element
  StackTrace:
       at Telerik.Windows.Controls.ChildrenOfTypeExtensions.<GetChildrenRecursive>d__3.MoveNext()
       at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext()
       at Telerik.Windows.Controls.Docking.ToolWindow.ActivatePane()
       at Telerik.Windows.Controls.Docking.ToolWindow.OnDragStart(Point globalMousePosition, Boolean isResize)
       at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IDragAware.OnDragStart(Point globalMousePosition, Boolean isResize)
       at Telerik.Windows.Controls.InternalWindow.WindowHostBase.OnDragStart(Point globalMousePosition, Boolean isResize)
       at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.TryBeginDragResize(IntPtr hwnd, Boolean resizing)
       at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.HandleMoving(IntPtr hwnd, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(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)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  InnerException:
Kalin
Telerik team
 answered on 02 Apr 2015
4 answers
172 views
I'm having a couple of  problems creating a marked zone on a RadCartesianChart and also with setting the "viewable" range on the chart. I was able to pretty much get it working in the code behind.  The attached picture shows what I'm after.  I'd like to be able to bind three separate charts 8hr, week and "all" or have one chart that can be set to display any of these 3. The Marked Zones that I've added come from ranges set elsewhere in the application. 


<telerik:ChartDataSource x:Name="EightHourChartDataSource"
                                    ItemsSource="{Binding EightHourData}"
                                    SamplingUnit="Hour"
                                    SamplingUnitInterval="1" />
            
           <StackPanel Margin="0,0,0,30"
                       Orientation="Vertical">
               <Label Content="Concentration % Last 8 Hours"
                      FontFamily="/GUIO;component/Fonts/#Segoe WP Black"
                      FontSize="16" />
               <telerik:RadCartesianChart x:Name="chart1"
                                          Height="150">
                   <telerik:RadCartesianChart.HorizontalAxis>
                       <telerik:DateTimeContinuousAxis LabelInterval="2"
                                                       LabelFormat="HH:mm"
                                                       FontFamily="Segoe UI"
                                                       PlotMode="OnTicks"
                                                       TickOrigin="{Binding Timestamp}" />
                   </telerik:RadCartesianChart.HorizontalAxis>
                   <telerik:RadCartesianChart.VerticalAxis>
                       <telerik:LinearAxis />
                   </telerik:RadCartesianChart.VerticalAxis>
 
                   <telerik:RadCartesianChart.Behaviors>
                       <telerik:ChartPanAndZoomBehavior />
                   </telerik:RadCartesianChart.Behaviors>
                   <telerik:LineSeries CategoryBinding="Timestamp"
                                       ValueBinding="Data"
                                       ItemsSource="{Binding ElementName=EightHourChartDataSource}"
                                       StrokeThickness="2"
                                       Stroke="Black"
                                       ShowLabels="True">
                       <telerik:LineSeries.PointTemplate>
                           <DataTemplate>
                               <Ellipse Width="6"
                                        Height="6"
                                        Fill="Black" />
                           </DataTemplate>
                       </telerik:LineSeries.PointTemplate>
                       <telerik:LineSeries.LabelConnectorsSettings>
                           <telerik:ChartSeriesLabelConnectorsSettings>
                               <telerik:ChartSeriesLabelConnectorsSettings.Style>
                                   <Style TargetType="{x:Type Path}">
                                       <Setter Property="Stroke"
                                               Value="Black" />
                                   </Style>
                               </telerik:ChartSeriesLabelConnectorsSettings.Style>
                           </telerik:ChartSeriesLabelConnectorsSettings>
                       </telerik:LineSeries.LabelConnectorsSettings>
                       <telerik:LineSeries.LabelDefinitions>
                           <telerik:ChartSeriesLabelDefinition VerticalAlignment="Top"
                                                               Margin="0 0 0 6">
                               <telerik:ChartSeriesLabelDefinition.Template>
                                   <DataTemplate>
                                       <Border Background="Black"
                                               BorderBrush="White"
                                               BorderThickness="1">
                                           <TextBlock Text="{Binding Label}"
                                                      Foreground="White"
                                                      FontFamily="Segoe UI"
                                                      Margin="2 0 2 1"
                                                      FontSize="10" />
                                       </Border>
                                   </DataTemplate>
                               </telerik:ChartSeriesLabelDefinition.Template>
                           </telerik:ChartSeriesLabelDefinition>
                       </telerik:LineSeries.LabelDefinitions>
                   </telerik:LineSeries>
               </telerik:RadCartesianChart>

This is how I added the "zones" and fixed the viewable range:

Protected Overrides Sub OnViewReady(view As Object)
        MyBase.OnViewReady(view)
 
        'Get the data
        Dim frm = Now.Subtract(TimeSpan.FromHours(8))
 
        EightHourData = New BindableCollection(Of DecimalData)(_dataService.GetDecimalData("CoolantMonitor").Where(Function(d) d.Timestamp > frm))
 
        If Not EightHourData.Any Then Return
 
        'Get the date of the first point with 30 min padding
        Dim f = EightHourData.First.Timestamp.Subtract(TimeSpan.FromMinutes(30))
        FromDate = New Date(f.Year, f.Month, f.Day, f.Hour, 0, 0)
 
        'Get the date of the last point with 30 min padding
        Dim t = EightHourData.Last.Timestamp.Add(TimeSpan.FromMinutes(30))
        ToDate = New Date(t.Year, t.Month, t.Day, t.Hour, 0, 0)
 
        'Get the view
        Dim v As CoolantMonitorDataView = Me.GetView
 
        'Get the chart
        Dim cv As RadCartesianChart = v.chart1
 
        'Create a vertical axis to scale the vertical view to the min and max
        cv.VerticalAxis = New LinearAxis With {.Minimum = 0, .Maximum = 20, .ShowLabels = False}
 
        'Create a line series that will scale the horizontal view
        Dim ls As New LineSeries
        ls.DataPoints.Clear()
        _startPoint = New CategoricalDataPoint With {.Category = FromDate, .Value = 0}
        ls.DataPoints.Add(_startPoint)
        _endPoint = New CategoricalDataPoint With {.Category = ToDate, .Value = 0}
        ls.DataPoints.Add(_endPoint)
        cv.Series.Add(ls)
 
 
        cv.Annotations.Clear()
 
        'Get the range settings
        Dim ranges = CoolantConcentrationRange.GetRange.Ranges
 
        'Create a marked zone for each range and add it the the Chart Annotations
        For Each r In ranges
 
            Dim b As New SolidColorBrush(r.RangeColor)
            b.Opacity = 0.3
 
            cv.Annotations.Add(New CartesianMarkedZoneAnnotation With {.HorizontalFrom = FromDate,
                                                                       .HorizontalTo = ToDate,
                                                                       .VerticalFrom = r.LowerValue,
                                                                       .VerticalTo = r.UpperValue,
                                                                       .Fill = b})
        Next
 
 
 
    End Sub
Thincster
Top achievements
Rank 1
 answered on 01 Apr 2015
2 answers
42 views
I have a project I am working on where the user can set items in the scheduler to to fire a particular times.  I make that work by just reading the date/time to fire.  But what I am unsure of is how to fire off a Recurrence?   Because all that is saved is the appointment and the pattern.  I saw your example in SDK about doing reminders of appointments, but that actually created a completely different scheduler item.

So is there a way for me to read recurrence pattern or from some other source to know when to fire an reoccurring event?  How to test for items against a current timer?

heavywoody
Top achievements
Rank 1
 answered on 01 Apr 2015
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?