Telerik Forums
UI for WPF Forum
4 answers
177 views
Hi,
I have a little problem here with the WPF RibbonView-Control:
The SelectionChanged-Event is not raised, when a RibbonTab is selected.
The PreviewSelectionChanged-Event works as expected.

To be sure, that there are no side effects from my application, I made a simple
wpf app (VS2010, .NET Framework 4, Q2 2011) with a RadRibbonWindow, RadRibbonView,
two empty RibbonTabs and the SelectionChangedEvent. Same effect.

Any Idea, what I am doing wrong?

thanks, 
Thomas
Tina Stancheva
Telerik team
 answered on 24 Jan 2012
1 answer
151 views
Hi All,
I have a problem where I have gone mad about a solution in the last hours. I have a RadChart with two Y-axis and on the X-Axis I would like to see string labels instead of numbers, but I always see the numbers...
My XAML is the following:
<telerik:RadChart ItemsSource="{Binding Chart2Data}" x:Name="chart2" >
        <telerik:RadChart.SamplingSettings>
            <telerik:SamplingSettings SamplingThreshold="240" />
        </telerik:RadChart.SamplingSettings>
        <telerik:RadChart.SeriesMappings>
            <telerik:SeriesMapping LegendLabel="{x:Static p:Resources.Report_MaskingTrail}" >
                <telerik:SeriesMapping.SeriesDefinition>
                    <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" ShowItemToolTips="False" />
                </telerik:SeriesMapping.SeriesDefinition>
                <telerik:SeriesMapping.ItemMappings>
                    <telerik:ItemMapping DataPointMember="YValue" FieldName="Y2" />
                    <telerik:ItemMapping FieldName="XLabel" DataPointMember="XCategory" />
                </telerik:SeriesMapping.ItemMappings>
            </telerik:SeriesMapping>
            <telerik:SeriesMapping LegendLabel="{x:Static p:Resources.Report_CoreLoudness}" >
                <telerik:SeriesMapping.SeriesDefinition>
                    <telerik:LineSeriesDefinition ShowItemLabels="False" ShowPointMarks="False" ShowItemToolTips="False" />
                </telerik:SeriesMapping.SeriesDefinition>
                <telerik:SeriesMapping.ItemMappings>
                    <telerik:ItemMapping DataPointMember="YValue" FieldName="Y1" />
                    <telerik:ItemMapping FieldName="XLabel" DataPointMember="XCategory"  />
                </telerik:SeriesMapping.ItemMappings>
            </telerik:SeriesMapping>
        </telerik:RadChart.SeriesMappings>
        <telerik:RadChart.DefaultView>
            <telerik:ChartDefaultView >
                <telerik:ChartDefaultView.ChartArea>
                    <telerik:ChartArea LegendName="legendLive"
                                       NoDataString="{x:Static p:Resources.NoMeasurementData}"
                                       EnableAnimations="False">
                        <telerik:ChartArea.AxisX>
                            <telerik:AxisX AutoRange="true" LabelRotationAngle="270"  />
                        </telerik:ChartArea.AxisX>
                        <telerik:ChartArea.AxisY>
                            <telerik:AxisY AutoRange="{Binding Path=Configuration.Chart2ManualConfiguration1, Converter={StaticResource inverseBooleanConverter}}"
                                MinValue="{Binding Path=Configuration.Chart2Minimum1}"
                                MaxValue="{Binding Path=Configuration.Chart2Maximum1}"
                                Step="{Binding Path=Configuration.Chart2YStep1}"
                                           Title="{x:Static p:Resources.Chart2_Series_Title}">
                                <telerik:AxisY.AxisStyles>
                                    <telerik:AxisStyles AxisLineStyle="{StaticResource AxisLineStyle}"
                                                        TickLineStyle="{StaticResource MajorTickLineStyle}"
                                                        MinorTickLineStyle="{StaticResource MinorTickLineStyle}"
                                                        ItemLabelStyle="{StaticResource CustomLabel}" />
                                </telerik:AxisY.AxisStyles>
                            </telerik:AxisY>
                        </telerik:ChartArea.AxisY>
                    </telerik:ChartArea>
                </telerik:ChartDefaultView.ChartArea>
                <telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartLegend x:Name="legendLive"
                                         Header="{x:Static p:Resources.ChartLegend}"
                                         LegendItemStyle="{StaticResource CustomLegendItem}"
                                         Visibility="Collapsed"
                                         />
                </telerik:ChartDefaultView.ChartLegend>
            </telerik:ChartDefaultView>
        </telerik:RadChart.DefaultView>
    </telerik:RadChart>

The data class has four properties:

X => The counter of the value, not bound the the chart
XLabel => a string which should be visible in the X-Axis
Y1, Y2 => The values for the two Y-axis.

Can someone explain to me what I am doing wrong?

Thanks,
Chris
Yavor
Telerik team
 answered on 24 Jan 2012
0 answers
85 views
Dear experts!
I'm creating a persistent data streaming utility.
How it works:

  1. some remote server constanly adds a new records to the database table
  2. my app has a UI control to display few thousands of latest records - RadGridView

For 2. I use DispatcherTimer which asks for a new portion of data every second.
When new data comes, I simply rewrite old cell values.
So my datagrid has a constant number of rows - if I'll ask for 100000 latest rows in SQL query, I'll get 100000 rows in gridview.
I'm trying to be very careful with performance and to create as less new objects as it possible.
Maybe, my approach is far from optimal - I'll be happy to know better one.

So, my question is:

How to highlight new rows, added in a latest RadGridView ItemsSource change, with a best performance?

Here is a small quick demo project that illustrates my project in general.

(To run it you need SQL Server CE 3.5+)

Will be glad to get any help! :)

Regards,
Mykola
Mykola
Top achievements
Rank 1
 asked on 24 Jan 2012
2 answers
257 views
Hi all,

This is a somewhat exploratory question as to how I could go about implementing a behaviour that I have been requested to implement. Apologies for my hyper-verbosity below :-).

The short version:
How do I stop a filter being applied when the value in a cell changes to no longer match the filter?

The requested behaviour:
(For some context) - I am currently implementing a mechanism whereby a user can right click on an editable column in the datagrid and choose to apply the current value to all currently visible (given the filter conditions of the grid) cells of the same column via a context menu. I have managed to get this feature working (at least in an initial version) and am reasonably confident that I will be able to develop it into the foundation of my project. 

< ... breathes in  ... >

The issue I am having relates to the effect of applying a filter to the same column that I am editing, and as such is not directly related to the above functionality. When a filter is applied to a column, editing a value to one which no longer matches the filter specified causes the row of the grid to be hidden when the user looses focus from the cell. While this logically makes sense to me as a developer in that the filter descriptors and the displayed data remain consistent. To the user, it appears that the data they were just editing has just disappeared (maybe forever). The ensuing panicked call to the support desk is one thing that I am trying to avoid. Also the ability to change one of the values, then apply that value to all other visible cells of the same column (as mentioned above) without this action causing said rows to be removed from the list of visible rows.

This behaviour can be seen in something like Excel 2010, where a filter can be applied to one or more columns, however the filter is not updated when the values in the columns change, unless the user specifically re-applies said filter.

Considered Approaches:
Here are a couple of approaches that I have already considered:
  1. Prevent Filtering on affected columns: Possibly the easiest solution to this issue would be to prevent (disable) filtering on columns where the value can be set via a context menu option. However, the ability to filter these columns is a desirable feature of the application, I would rather not remove the functionality unless it is necessary.
  2. Disable the context menu if a filter is applied: This would be a bit better than the last option, in that it would allow both features, just not at the same time. The problem here is how to inform the user (in an unobtrusive manner) that the ability to set the value is disabled because they have applied some sort of filter to this column and that removing that filter will allow them to perform the update that they want to. The catch here is that the filter they applied will be restricting the results to those that they want to update, removing it will likely change that result set ... catch 22.
  3. Automatically include the updated value in the filter descriptors for that column: This is my current best candidate although it has some limitations. This option would ensure that the new value would not cause the column to be removed from the set of visible columns. However, including another value in the filter could have unforeseen consequences (for example if 90% of the rows had the value of "2" and the filter was set to include only items which are NOT equal to "2". Setting the remaining values to "2" would result in an invalid filter (all values = "2" AND != "2" ... none). That is a fairly simple example, but they could be infinitely more complicated). Alternatively, even if the resulting filter was valid, it could result in the inclusion of the other 90% of the data, resulting in the row that you were editing being lost in the sea of data and the user being "surprised" by the sudden unexpected flood of information (and we all know there is nothing more dangerous than a surprised user).
  4. Prevent the modification of a value from having the current filter applied: This approach most closely emulates Excel 2010. However I have a few issues with it. How would the user know that the results shown in the grid no longer match the specified filters? (Could be done by changing the filter icon, but that is blowing the scope of this change out a bit). Secondly, how would someone go about doing this? I have been thinking about how to achieve this for a couple of days with no joy.

Any suggestions or comments, particularly on how to implement point 4 (above) would be greatly appreciated.

Regards,
    Mark
 
Ben
Top achievements
Rank 1
 answered on 24 Jan 2012
0 answers
188 views
For the same viewmodel, RadComboBox does not fire the command, whereas the WPF Combobox fires the command. Here is the xaml for both in the same view.

For the below xaml, the action part of the command is NEVER executed in the itemviewmodel. 
<telerik:RadComboBox x:Name="myNewComboBox1"
                                 Height="30"
                                 Width="150"
                                 Margin="10,20"
                                 ItemsSource="{Binding Path=DateRanges}"
                                 SelectedItem="{Binding Path=SelectedValue, Mode=TwoWay}">
                <telerik:RadComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock>
                            <Hyperlink Command="{Binding Path=HyperLinkCommand}">
                                <Run Text="{Binding Path=Text}" />
                            </Hyperlink>
                        </TextBlock>
                    </DataTemplate>
                </telerik:RadComboBox.ItemTemplate>
  </telerik:RadComboBox>

Commands fires in this case.
<ComboBox x:Name="myNewComboBox2"
                                 Height="30"
                                 Width="150"
                                 Margin="10,20"
                                 ItemsSource="{Binding Path=DateRanges}"
                                 SelectedItem="{Binding Path=SelectedValue, Mode=TwoWay}">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock>
                            <Hyperlink Command="{Binding Path=HyperLinkCommand}">
                                <Run Text="{Binding Path=Text}" />
                            </Hyperlink>
                        </TextBlock>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
  </ComboBox>

Any reason why RadComboBox behaves like this and eats up the command?

Thanks.



Gautam
Top achievements
Rank 1
 asked on 23 Jan 2012
1 answer
121 views
Multiple click the "up" arrow of the map navigator.
Get the exception:
System.ArgumentException was unhandled
  Message='-0,030812377929665;-Infinito' is not a valid value for property 'To'.
Source=WindowsBase
StackTrace:
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
at System.Windows.Media.Animation.PointAnimation.set_To(Nullable`1 value)
at Telerik.Windows.Controls.Map.MultiScaleImage.SetSpringsAnimationTimer()
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.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(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.Threading.Dispatcher.Run()
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 RadarSoft.Report.EditorWPF.App.Main() in D:\Report\RadarSoft.Report.EditorWPF\obj\x86\Release\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:


Andrey
Telerik team
 answered on 23 Jan 2012
1 answer
68 views
I have a chart that contains two custom grid lines. However, I only want to show them under certain circumstances. I noticed the Visibility property doesn't support binding. I'd rather not set this property in code-behind, as I'm trying to bind everything via MVVM. Is code-behind my only choice here?
Randy Minder
Top achievements
Rank 1
 answered on 23 Jan 2012
2 answers
137 views
Hi,

I have set up a RadChart with a ScatterSeriesDefinition. I am then setting the ItemsSource from the code, by passing it an ObservableCollection<> which holds a custom object called Coordinate, which is essentially just an object that stores an X value and a Y value.

My problem is, there is probably about 1000 Coordinate's in the ObservableCollection, yet only about 200 of them are being displayed on the Chart. 

Is there a limit to the number of points that this type of chart can hold in one series? Or am I doing something wrong?

Thanks

Daniel
Top achievements
Rank 1
 answered on 23 Jan 2012
10 answers
261 views
I have been trying to find examples of how to handle the linking of two charts axis.

I have two charts which each contain multiple series of dynamic data, the data all has a datetime x-axis.

What I am trying to do is to have them share the same zoom and values / spacing etc along the x-axis for the two charts.

Is there an easy way to achieve this with the radchart? Can you possibly point me in the direction of an example

thanks for you time

regards

Murray
Evgenia
Telerik team
 answered on 23 Jan 2012
2 answers
158 views
An easy question, hopefully with an easy solution : 

I use piecharts and StackedBar100 charts in our application to display voting results and results of multiple choice tests. The results are updated during the test, as answers are coming in. We get complaints about the "0" labels which are disturbing both in the stacked barcharts and in the piechart. However, when I set LabelSettings.ShowZeroValueLabels = false, no labels are ever shown. All datavalues are zero at the start of the test, and updating the dataseries dynamically works ok, but the hidden labels don't appear when a value becomes non-zero.  Only solution I see to make the labels appear is to redraw the chart on each incoming result, but that is not feasible. 
Is there a way to solve this issue ? 

thanks,
Xavier De Donder
Televic Education.

Yoeri
Top achievements
Rank 1
 answered on 23 Jan 2012
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?