Telerik Forums
UI for WPF Forum
5 answers
337 views
Hi,

I've looked at the demos of the ChartView control on how to create a bar chart and noticed that each bar is defined in xaml and bound to data. 

In my case the bars aren't known until runtime, so my question is how can one dynamically add barseries to a Chartview using MVVM ?

My data is defined as such:

class BarData // Represents one "item" on the x-axis
 
{
DateTime Date {get; set;} // X-Axis, works fine
 
Dictionary<string,double> Items = new Dictionary <string, double> ();  // string is the name of the category, and double is the value
 
}

I'm not sure if this is the best way to represent data for creating the Chart and I'm open to feedback for this.
Nikolay
Telerik team
 answered on 24 Jan 2013
9 answers
234 views
Good evening,

I keep experiencing a null reference exception when pressing Mouse Left Button Down. The event appears to be random (there must be a reason for it) but I am unable to determine if it is something I have caused or if it is the control itself.

I'm a bit of a newbie and I don't fully understand what details of the error message.
Below I have pasted the exception message generated in VS2010. Does this mean anything to anyone?

Thank you very much for your time,

Rob


Message

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls
  StackTrace:
       at Telerik.Windows.Controls.Primitives.ListItem.OnMouseLeftButtonUp(MouseButtonEventArgs e) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\ListControl\ListItem.cs:line 91
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(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.OnMouseUpThunk(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)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at TAS2.App.Main() in C:\TAS2\TAS2\obj\x86\Debug\App.g.cs:line 0
  InnerException:
Georgi
Telerik team
 answered on 24 Jan 2013
1 answer
146 views
I know in 2012 Q3 there is an example of ColorPicker and ColorEditor integration, however, it involves the requirement of a custom window plus a custom viewmodel. This is really not developer-friendly or MVVM-friendly.

I would like to see it integrated by default so that I can just declare something like the following instead of having to create a CustomColorViewModel for every color that I want to edit:
<telerik:RadColorPicker SelectedColor="{Binding FillColor, Mode=TwoWay}" EnableColorEditor="True" />

WPF toolkits from some other companies already has this feature, and IMO this should be a very basic feature of the ColorPicker control. Please add it into the next release.
Petar Mladenov
Telerik team
 answered on 24 Jan 2013
8 answers
380 views
I don't need the border-less cells but I need to really merge two footer cells. Is it possible to merge footer cells of two consecutive columns?

I need to enter some text in the footer cell but width of the column is too short to display that text. This is why I need to merge the footer cells.

Any suggestions?
Maya
Telerik team
 answered on 24 Jan 2013
2 answers
214 views
I have a TreeView in my UserControl and when I tab into it from the previous control, the focusvisual shows on the TreeView as a whole, and I can't seem to get access to the TreeViewItems.  How can I make the first (or selected) TreeViewItem be the one that has the focus so I can navigate the Tree?

Thanks in advance,
Steve
Steve
Top achievements
Rank 1
 answered on 23 Jan 2013
0 answers
110 views
Hi Telerik,

I have a RadGridView with a DataTable dt as ItemsSource. Since dt is dynamic, I cannot define the columns in XAML. As a result, I set AutoGenerateColumn to true.

One trouble I have, however, is that a few of these columns are foreign keys and I would like to set those columns to be GridViewComboBoxColumns instead of the standard GridViewBoundColumn for strings. Unfortunately, it appears that GridViewComboBoxColumns (along with others like GridViewHyperLinkColumns, etc) are never actually autogenerated regardless of data type.

Is there any way I can hijack the column generation process to ensure a GridViewComboBoxColumn is generated when needed? All I really need is a combo box that lets me choose the value for cells in particular columns.

Thanks.
New
Top achievements
Rank 1
 asked on 23 Jan 2013
7 answers
190 views
I'm testing out the pivot grid control and adapted the sample to use adomd.

The problem is when I run it, I get no fields in the picker. Everything is empty. No errors, no extended errors in VS when debugging.

I can verify my connection string is working because I can create an AdomdConnection using Microsoft's API and successfully connect to the SSAS server and see the connection metadata/properties while it's open when debugging with VS.

SASS is 10.50.1600.1,
Microsoft.AnalysisServices.AdomdClinet is v 10.0
WPF 4.0

Not sure why I'm not getting anything using the telerik control.
Rosen Vladimirov
Telerik team
 answered on 23 Jan 2013
4 answers
371 views
Hi,

I am trying to build a rad grid view dynamically and I have a slight issue with the column groups.

When the table is shown not all of the groups are shown but when I scroll they appear (only the first 10 get drawn when the grid is first loaded).

I have tried tow different approaches to make this work;
  1. Extending RadGridView and building the table based on a dependency property that contains the details of what columns/groups need to be added and,
  2. Moving the dependency property up a level and working with an out of the box RadGridView.

Do you have any suggestions of what I can do to get all of the column groups to be drawn when the grid view is first loaded?

Thanks,

Steven
Steven
Top achievements
Rank 1
 answered on 23 Jan 2013
0 answers
100 views
Hi,

is there any easy way to set DropVisual using DragDropManager?

I mean something similar to

DragInitializeEventArgs.DragVisual

 

 

 

 

Daniel
Top achievements
Rank 1
 asked on 23 Jan 2013
5 answers
118 views
I just updated to the newest version and went through the release note. The change "Column aligned aggregates" in GridView caught my interest, but I seem to be unable to find anything usefull when I search for that term anywhere (also in the documentation).

There were no link in the release note to take me to a detailed description of this change.

How and where do I find the documentation of this?

Thanks
Dimitrina
Telerik team
 answered on 23 Jan 2013
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?