Telerik Forums
UI for WPF Forum
3 answers
233 views
A few questions after playing with the Sparkline example here : C:\Program Files (x86)\Telerik\RadControls for WPF Q3 2010 SP1\Demos\Examples\BulletGraph

1.  Can a RadColumnSparkline show the bars in a horizontal orientation?  Default seems to be vertical - I didn't see a property to change orientation.

2.  The examples all seem to bind to a DateTime on the X-Axis.  Is it possible to bind to something like a string and if so what would happen?

Where your current example data looks like:
actual,Late arrivals,11/1/2004,1
actual,Late arrivals,12/1/2004,24
actual,Late arrivals,1/1/2005,32

What if I wanted to bind to NOTE: the date is replaced by a string (site name) value:

web ranking,Site 1, 1000
web ranking,Site 2, 2222
web ranking,Site 3, 4444

3.  Do you have an example of how to do some of this XAML binding in C# code rather than XAML?  In essence doing this type of thing in a non-xaml/dynamic way?
              <telerik:GridViewDataColumn Header="actuals nov'04 - nov'05">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadColumnSparkline ShowFirstPointIndicator="True" ShowLastPointIndicator="True" ShowHighPointIndicators="True" ShowLowPointIndicators="True" ItemsSource="{Binding ActualMeasure}" XValuePath="Date" YValuePath="Value" Width="120" Height="20" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>

4.  I'm adding another question to the post:

I have 5 data points, but the chart is only showing 4 of the points. Like it is throwing out the lowest data point and not plotting it at all.  Is that a function of telerik:RadColumnSparkline attribute?


actual,(Google) Day Spas in Houston,11/1/2004,100
actual,(Google) Day Spas in Houston,12/1/2004,75
actual,(Google) Day Spas in Houston,1/1/2005,72
actual,(Google) Day Spas in Houston,2/1/2005,77
actual,(Google) Day Spas in Houston,3/1/2005,66


 <telerik:RadColumnSparkline ShowAxis="true" ShowLastPointIndicator="True" ShowFirstPointIndicator="True" ShowHighPointIndicators="True" ShowLowPointIndicators="True"  ItemsSource="{Binding ActualMeasure}" XValuePath="Date" YValuePath="Value" Width="120" Height="20" />
Yavor
Telerik team
 answered on 31 Mar 2011
1 answer
151 views
Hi there,

I want the grid to display empty rows up to the bottom if i don't have data in it. Is there any way how to add a empty row all the time....

thanks
Vlad
Telerik team
 answered on 31 Mar 2011
1 answer
72 views
Hi there,

I've gone through the examples I could find for point mark visibility, but could not get it to work. I have a chart with two series mappings: (i) BarSeriesDefinition and (ii) LineSeriesDefinition. In the LineSeriesDefinition I only want to display the PointMark in the first and last PointMark in the data set as the FieldName "Target" value does not change.

Here is what I have:
<telerik:RadChart x:Name="radChart" ItemsSource="{Binding CounterValues}">
  <telerik:RadChart.DefaultView>
    <telerik:ChartDefaultView>
      <telerik:ChartDefaultView.ChartTitle>
        <telerik:ChartTitle Content="Counter Data" />
      </telerik:ChartDefaultView.ChartTitle>
      <telerik:ChartDefaultView.ChartArea>
        <telerik:ChartArea>
          <telerik:ChartArea.AxisX>
            <telerik:AxisX IsDateTime="True" Step="1" LabelStep="1" DefaultLabelFormat="dd-MMM" StepLabelLevelCount="1" StepLabelLevelHeight="1" />
          </telerik:ChartArea.AxisX>
        </telerik:ChartArea>
      </telerik:ChartDefaultView.ChartArea>
    </telerik:ChartDefaultView>
  </telerik:RadChart.DefaultView>
  <telerik:RadChart.SeriesMappings>
    <telerik:SeriesMapping LegendLabel="Counter Values">
      <telerik:SeriesMapping.SeriesDefinition>
        <telerik:BarSeriesDefinition/>
      </telerik:SeriesMapping.SeriesDefinition>
      <telerik:SeriesMapping.ItemMappings>
        <telerik:ItemMapping DataPointMember="YValue" FieldName="CounterValue" />
        <telerik:ItemMapping DataPointMember="XValue" FieldName="Day" />
      </telerik:SeriesMapping.ItemMappings>
    </telerik:SeriesMapping>
    <telerik:SeriesMapping LegendLabel="Target">
      <telerik:SeriesMapping.SeriesDefinition>
        <telerik:LineSeriesDefinition/>
      </telerik:SeriesMapping.SeriesDefinition>
      <telerik:SeriesMapping.ItemMappings>
        <telerik:ItemMapping DataPointMember="YValue" FieldName="Target" />
        <telerik:ItemMapping DataPointMember="XValue" FieldName="Day" />
      </telerik:SeriesMapping.ItemMappings>
    </telerik:SeriesMapping>
  </telerik:RadChart.SeriesMappings>
</telerik:RadChart>


Can you please let me know how to do this?
Sia
Telerik team
 answered on 30 Mar 2011
5 answers
148 views
Hi,

as the thread titles says, if I change the DataContext of a GridView, a ComboBoxColumn whose ItemsSource binds to a collection in the DataContext don't change with changing the DataContext. Instead the values of the DataContext which was assigned before remain.

If I check

this.GridView.Columns[4].GetBindingExpression(GridViewComboBoxColumn.ItemsSourceProperty).DataItem


while debugging, I can see that "DataItem" still references the old DataContext -although-

this.GridView.Columns[4].DataContext


references the newly assigned DataContext.

I do not understand this behavior. Thanks.
Pavel Pavlov
Telerik team
 answered on 30 Mar 2011
1 answer
72 views
I have a monitor board application which is simply a full-screen Window with a single RadTransition container in it. I have defined a number of UserControls, each essentially a screen with data-driven reports. The application cycles through a number of these screens continuously during the day, with data refreshing every 15 minutes. My problem is that as the screen cycles, the application grows in memory slightly but continuously until eventually (after eight hours or so) it crashes from lack of memory.

How can I make sure that the previous UserControl is well and truly unloaded and its resources released after a new control is loaded in the RadTransition control?
Valeri Hristov
Telerik team
 answered on 30 Mar 2011
1 answer
389 views
I downloaded new version of telerik wpf controls. I am adding dll of telerik.windows.controls.dll and telerik.windows.control.gridview with other dlls. I can add the refrernece of gridview namespace but when i am using it by tag <telerikGridView: ..  GridView is not visible. Also in the toolbox other controls are coming not the gridview. 
Vanya Pavlova
Telerik team
 answered on 30 Mar 2011
1 answer
157 views
Hi there,

I have a command binding in my WPF form, it looks like this,
<UserControl.InputBindings>
      <KeyBinding Key="Enter" Command="{Binding Path=AddSelectedProductTypeCommand}"/>
  </UserControl.InputBindings>
I also have a grid that is non editable, however pressing the enter key causes a red outline to form around the grid, I suspect that it is grabbing the enter key press and then complaining cause IsReadOnly="True",

How can I tell the grid to ignore any key presses? Or just the enter key... I will take either.

Thanks
Ivan Ivanov
Telerik team
 answered on 30 Mar 2011
4 answers
176 views
Hi there,

I have a custom MultiSelect attached property, I can use it with a ListBox however I can't seem to use it with your grid view, I get an error that say's property 'IsEnabled' is not attachable to type elements of type 'RadGridView' - Why would it work with a listbox but not a gridview? I mean, it's just an attached property - I don't see what the issue is with a the grid.

Here is the code for the MultiSelect.cs
public static class MultiSelect
  {
      static MultiSelect()
      {
          Selector.ItemsSourceProperty.OverrideMetadata(typeof(Selector), new FrameworkPropertyMetadata(ItemsSourceChanged));
      }
 
      public static bool GetIsEnabled(Selector target)
      {
          return (bool)target.GetValue(IsEnabledProperty);
      }
 
      public static void SetIsEnabled(Selector target, bool value)
      {
          target.SetValue(IsEnabledProperty, value);
      }
 
      public static readonly DependencyProperty IsEnabledProperty =
          DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(MultiSelect),
              new UIPropertyMetadata(IsEnabledChanged));
 
      static void IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)
      {
          Selector selector = sender as Selector;
          IMultiSelectCollectionView collectionView = selector.ItemsSource as IMultiSelectCollectionView;
 
          if (selector != null && collectionView != null)
          {
              if ((bool)e.NewValue)
              {
                  collectionView.AddControl(selector);
              }
              else
              {
                  collectionView.RemoveControl(selector);
              }
          }
      }
 
      static void ItemsSourceChanged(object sender, DependencyPropertyChangedEventArgs e)
      {
          Selector selector = sender as Selector;
 
          if (GetIsEnabled(selector))
          {
              IMultiSelectCollectionView oldCollectionView = e.OldValue as IMultiSelectCollectionView;
              IMultiSelectCollectionView newCollectionView = e.NewValue as IMultiSelectCollectionView;
 
              if (oldCollectionView != null)
              {
                  oldCollectionView.RemoveControl(selector);
              }
 
              if (newCollectionView != null)
              {
                  newCollectionView.AddControl(selector);
              }
          }
      }
  }
Thanks for any help...
ken
Top achievements
Rank 1
 answered on 30 Mar 2011
1 answer
114 views
Hi there,  Really getting somewhere with using the ScheduleView, It has enabled to solve a good few problems in recent developments. 

One thing that we're trying to achieve now is to Schedule appointments that don't necessarily have an actual start & end datetime but rather plan something in terms of Days.

For instance, if a user wanted to plan a 5 day conference but had no start date would it be possible to show
Day 1 | Day 2 | Day 3 | Day 4 | Day 5 

as the major horizontal tick on the TimeLine view (we're using the Timeline view exclusively)  Also would it be able to go from Day 1 up to Day N where N is the VisibleDays property?

This would allow the user to build a profile of the event which could be saved somehow and then applied at a different point when the actual dates are known.

To work out the relative day I would have the control manage dates between DateTime.Today up to N visible days and work out the relative days from that but I'd really like to be able to display Day X in the header.

I've tried a few things but nothing seems to work :\
Valeri Hristov
Telerik team
 answered on 30 Mar 2011
7 answers
365 views
Hi

I am setting

StepAction="MoveRange" and range is moving with the mouse click.

 

 

 

But the issue is that when I a dragging mouse then range is changing. How do I disable the Mouse drag.




HorizontalAlignment
="Right"

 

 

 

 

IsSnapToTickEnabled="True"

 

 

 

 

Margin="0,10,12,52"

 

 

 

 

Minimum="1"

 

 

 

 

Name="monthSlider"

 

 

 

 

Maximum="12"

 

 

 

 

SmallChange="0"

 

 

 

 

StepAction="MoveRange"

 

 

 

TickFrequency="1"

 

 

 

LargeChange="3"

 

 

 

 

SelectionEnd="3"

 

 

 

SelectionStart="1"

 

 

 

IsSelectionRangeEnabled="True"

 

 

 

 

SelectionRangeChanged="monthSlider_SelectionRangeChanged"

 

Petar Mladenov
Telerik team
 answered on 30 Mar 2011
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?