Telerik Forums
UI for WPF Forum
1 answer
75 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
343 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
144 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
180 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
46 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
3 answers
213 views
Hello

I have dug around but found no answer to this. It seems when my new pane is added to the DocumentHost its DataContext is always null and not inherited. 

I was thinking there is some way around this with the DockingPanesFactory but I couldn't find it.

WPF Inspector says that the DataContext is completely fine up until it reaches ContentElement.

Is there a way to get the ContentElement to inherit the DataContext?

Nasko
Telerik team
 answered on 01 Apr 2015
1 answer
159 views
My RadGridView instances always have several properties that are set exactly the same way. Something like this:

<telerik:RadGridView  RowIndicatorVisibility="Collapsed"  AllowDrop="False" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserReorderColumns="False" GridLinesVisibility="Both" ShowGroupPanel="False" ShowColumnHeaders="True" IsFilteringAllowed="False" CanUserFreezeColumns="False" CanUserInsertRows="False" >...</telerik:RadGridView>

So I thought, why not derive from this control and set those properties in the constructor?  I wrote this class that extends RadGridView:

namespace MyUI
{
 public class MyGridView : Telerik.Windows.Controls.RadGridView
    {
        public MyGridView()
            : base()
        {
            this.RowIndicatorVisibility = System.Windows.Visibility.Collapsed;
            this.AllowDrop = false;
            this.AutoGenerateColumns = false;
            this.CanUserDeleteRows = false;
            this.CanUserReorderColumns = false;
            this.GridLinesVisibility = Telerik.Windows.Controls.GridView.GridLinesVisibility.Both;
            this.ShowGroupPanel = false;
            this.ShowColumnHeaders = true;
            this.IsFilteringAllowed = false;
            this.CanUserFreezeColumns = false;
            this.CanUserInsertRows = false;
        }
    }
}

Okay, so using this should be as simple as this:

<Window ...
  xmlns:local="clr-namespace:MyUI;assembly=MyUI">
 
<local:MyGridView >...</local:MyGridView>
 
</Window>

It won't compile.  I get an error that says "The name 'MyGridView' does not exist in the namespace 'clr-namespace:MyUI'".

I've tried declaring the namespace with and without the "assembly=MyUI" part.  

What am I doing wrong here?

Thanks.

Aaron
Dimitrina
Telerik team
 answered on 01 Apr 2015
3 answers
134 views
Hello

I am using the RadDataPager in UnboundMode in connection with a RadGridView or a RadListBox.
The data from a page are loaded by an Event PageIndexChanged.
How can I navigate to a certain page (for example page 3) or select a certain element in Code-Behind or in XAML.
The commands PageIndex=3 or MoveToPage(3) seem to have no effect.

Sincerely,
A. Kasar
Dimitrina
Telerik team
 answered on 01 Apr 2015
1 answer
390 views
Hi,

May I know is there anyway to style the row validation of Telerik Rad Grid View where I only want a red border line to highlight the particular row that have error, but not the default style where the entire row is in red. 
Dimitrina
Telerik team
 answered on 01 Apr 2015
17 answers
216 views
It seems that the first character entered is only handled as the EditTrigger but the actual character isn't input in the grid.

When I have a cell selected but not in edit mode I want to write 4567in it. In excel this would work. In radgrid the original 4 keypress would enter edit mode, then 567 would be entered into the cell. How can I make it so that the 4 is both handled as a EditTrigger as well as input?
Dimitrina
Telerik team
 answered on 01 Apr 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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?