Telerik Forums
UI for WPF Forum
1 answer
164 views
Error occurs when I switch between cells with key "Tab" :
Value cannot be null.
Parameter name: source

Stack Trace

   at System.Linq.Enumerable.Cast[TResult](IEnumerable source)
   at Telerik.Windows.Controls.GridViewBoundColumnBase.GetValidationErrors(Object dataItem, String propertyName) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 1579
   at Telerik.Windows.Controls.GridView.GridViewCell.<GetDataErrors>d__7.MoveNext() in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 709
   at Telerik.Windows.Data.EnumerableExtensions.Count(IEnumerable source) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Core\Data\Collections\EnumerableExtensions.cs:line 124
   at Telerik.Windows.Controls.GridView.GridViewCell.UpdateIsValidState() in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 603
   at Telerik.Windows.Controls.GridView.GridViewCell.UpdateValue() in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1594
   at Telerik.Windows.Controls.GridView.GridViewCell.SetCellElement() in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 522
   at Telerik.Windows.Controls.GridView.GridViewCell.HideEditor() in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 818
   at Telerik.Windows.Controls.GridView.GridViewCell.ToggleEditor() in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1130
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCellEditModeChanged(GridViewCell cell, Boolean newIsInEditMode) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 400
   at Telerik.Windows.Controls.GridView.GridViewCell.IsInEditModeChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1118
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.GridView.GridViewCell.set_IsInEditMode(Boolean value) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 298
   at Telerik.Windows.Controls.GridView.GridViewCell.RaiseCellEditEndedEvent(GridViewEditAction editAction) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1229
   at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformCellEditEnded(GridViewCell currentCell) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 108
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CommitCellEdit(GridViewCell currentCell, Boolean isLeavingRow) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 69
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCurrentCellInfoChanging(GridViewCellInfo oldCell, GridViewCellInfo newCell) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 841
   at Telerik.Windows.Controls.GridView.GridViewDataControl.set_CurrentCellInfo(GridViewCellInfo value) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 803
   at Telerik.Windows.Controls.GridView.GridViewDataControl.BeginEdit(GridViewCell gridViewCell, RoutedEventArgs editingEventArgs) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 667
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCellMouseDown(GridViewCell cell, MouseButtonEventArgs args) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 356
   at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e) in c:\TB\135\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 418
   at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.OnMouseDownThunk(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)
Vera
Telerik team
 answered on 28 Nov 2012
1 answer
137 views
Is RaWindow a good candidate to function as a child window that cannot be dragged outside the confines of its parent's boundaries?

Similar to shadowbox-type functionality on websites when user input is required and parent is locked?  We'd like the user to still be able to drag/resize/minimize/etc the parent while the child window is controlling it.
George
Telerik team
 answered on 28 Nov 2012
9 answers
265 views
hello,

i am trying to set up a custom range on my y axis as our 'date' values are custom generated and do not work in the same way as normal dates or numeric values.

we have a situation where the chart would run along variable time levels, ie sometimes weeks, sometimes months, quarters, etc. the chart needs to plot these time members across the Y axis of a horizontal 2D Bar chart and display the values as such:

M201010       M201011       M201012     M201101 etc..

what we did to overcome the fact that we need a numeric value for the axis was to use only the numeric section of the chart and then set a min and max value (since we know the start and end date for the chart) but this works only as long as the values are for the same year, in this example 2010.

if the periods span over 2 years, ie from 2010 to 2011, the series stretches from M201012 all the way to M201099 before getting on to 2011, because it increments by one of course.

the chart is set up in the xaml as follows:

<telerik:RadChart Grid.Row="0" Grid.Column="0" x:Name="TimeRangeChart" ItemsSource="{Binding PhasingOptionList}" UseDefaultLayout="False" DataBound="TimeRangeChart_Loaded">
            <telerik:RadChart.Resources>
                <Style x:Key="CustomAxisTitleStyle" TargetType="telerik:AxisTitle">
                    <Setter Property="FontWeight" Value="Normal" />
                    <Setter Property="Margin" Value="0,0,10,0" />
                </Style>
                <Style x:Key="SeriesItemLabelStyle" TargetType="telerik:SeriesItemLabel">
                    <Setter Property="VerticalAlignment" Value="Center" />
                </Style>
                <Style x:Key="ItemLabelStyle" TargetType="TextBlock">
                    <Setter Property="HorizontalAlignment" Value="Left"/>
                    <Setter Property="Visibility" Value="Collapsed"/>                   
                </Style>
            </telerik:RadChart.Resources>
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping ChartAreaName="ChartArea" >
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:HorizontalRangeBarSeriesDefinition ShowItemLabels="True" ItemLabelFormat="#OptionName - #ColourDescr"
                                                                    ShowItemToolTips="True" SeriesItemLabelStyle="{StaticResource SeriesItemLabelStyle}">                          
                            <telerik:HorizontalRangeBarSeriesDefinition.InteractivitySettings>
                                <telerik:InteractivitySettings SelectionMode="Single" SelectionScope="Item" HoverScope="Item"  />
                            </telerik:HorizontalRangeBarSeriesDefinition.InteractivitySettings>
                        </telerik:HorizontalRangeBarSeriesDefinition>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:ItemMapping FieldName="ProposedSellTimeFromCodeNumeric" DataPointMember="Low" />
                    <telerik:ItemMapping FieldName="ProposedSellTimeToCodeNumeric" DataPointMember="High" />
                    <telerik:ItemMapping FieldName="OptionNo" DataPointMember="XCategory" />
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <telerik:ChartArea Grid.Row="0" x:Name="ChartArea" NoDataString="" LabelFormatBehavior="None"
                                   ItemClick="ChartArea_ItemClick" ItemToolTipOpening="ChartArea_ItemToolTipOpening"
                                    PaletteBrushesRepeat="False" EnableAnimations="False" >
                    <telerik:ChartArea.ZoomScrollSettingsX>
                        <telerik:ZoomScrollSettings ScrollMode="ScrollAndZoom" MinZoomRange="0.005"/>
                    </telerik:ChartArea.ZoomScrollSettingsX>
                    <telerik:ChartArea.PaletteBrushes>
                        <SolidColorBrush Color="#FF74A6E2"/>
                    </telerik:ChartArea.PaletteBrushes>
                    <telerik:ChartArea.AxisY>
                        <telerik:AxisY Title="{Binding BottomTimePeriodDescription}" ExtendDirection="Up" DefaultLabelFormat="{Binding TimeValueLabelFormat}"
                                        MinValue="{Binding FromWeekNumeric}" MaxValue="{Binding ToWeekNumeric}" AutoRange="False"
                                        LabelRotationAngle="-45" MinorTicksVisibility="Hidden">
                            <telerik:AxisY.AxisStyles>
                                <telerik:AxisStyles TitleStyle="{StaticResource CustomAxisTitleStyle}" ItemLabelStyle="{StaticResource ChartAxisTextStyle}" />
                            </telerik:AxisY.AxisStyles>
                        </telerik:AxisY>
                    </telerik:ChartArea.AxisY>
                    <telerik:ChartArea.AxisX>
                        <telerik:AxisX LayoutMode="Inside" MinorTicksVisibility="Collapsed" MajorTicksVisibility="Collapsed"  >
                            <telerik:AxisX.AxisStyles>
                                <telerik:AxisStyles ItemLabelStyle="{StaticResource ItemLabelStyle}" />
                            </telerik:AxisX.AxisStyles>
                        </telerik:AxisX>
                    </telerik:ChartArea.AxisX>
                </telerik:ChartArea>               
            </Grid>
        </telerik:RadChart>


is there a way to get around this?

thanks,
Nemanja
Nemanja
Top achievements
Rank 1
 answered on 28 Nov 2012
3 answers
298 views
I show a message box in cellvalidating event to show the error message as a Messagebox..

It usually work ok, but if i use the TAB key to move out of the field, the event fire twice (so the message box show twice... )


A sample project is attached to the support ticket #384333
http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=384333
Yordanka
Telerik team
 answered on 28 Nov 2012
2 answers
316 views
Hi There,
I am using the RadPane and RadDocumentPane in my application, can you please tell me what is difference between them ?

Regards,
Srinivas.

Ravi
Top achievements
Rank 1
 answered on 28 Nov 2012
4 answers
214 views
Hi, I am attempting to add a custom line or custom grid line annotation to my RadChart. I need to make the line dashed, but do so completely in c#, not using any XAML styles. How would I do this?

Also, how would I add my annotation to my legend, completely in code. I saw the example:
http://www.telerik.com/help/wpf/radchart-how-to-add-annotations-in-chart-legend.html, but that uses XAML styles, and I can't do that.

How would I ensure that the annotation appears in front of the data series? I.E. the bars for the bar chart are behind the annotation.

And finally, how would I add labels to annotations, again, in c# code only.
Petar Kirov
Telerik team
 answered on 27 Nov 2012
6 answers
209 views

This is based on the most recent build we have (downloaded this morning, RadControls_for_WPF_2011_3_1116_Dev_hotfix)

 

When we import a  file in docx format, and do a MailMerge() call, the fields merging appears to work perfectly, except that the style (or ‘format’ in MS Word parlance) is not maintained. Whether it’s bold, underlined, different font, different colour, it doesn’t matter, the text that is merged into that field always goes in with what appears to be the default RadDocument/RichTextDocument format (Verdana, 12 pt).

I’ve not been able to find any properties or anything that seem to indicate that merged values will override the styles/formats of the merge fields they’re replacing. It doesn’t appear as if it’s respecting the “Preserve formatting during updates” setting from MS Word

This is the code being used:

 

private RadDocument MergeDataFieldsWithDocument(RadDocument radDocument)

        {

 

            var mergeFieldsAndValues = DeriveValuesToMergeWithDocumentFields();

 

            radDocument.MailMergeDataSource.ItemsSource = mergeFieldsAndValues;

            return radDocument.MailMerge(false);

        }

 

        private static List<object> DeriveValuesToMergeWithDocumentFields()

        {

            return new List<object>

                       {

                           new

                               {

                                  DATE_TODAY = "test"

                               }

                       };

        }

How can we make it so that the merge fields use the correct format?

Thanks,

Brock

Petya
Telerik team
 answered on 27 Nov 2012
3 answers
290 views

Hi, I use the following code to overwrite the FilteringControl

public class ContainsFilteringControl: FilteringControl
    {
        public override void Prepare(GridViewColumn gridViewColumn)
        {
            base.Prepare(gridViewColumn);
  
            var vm = DataContext as FilteringViewModel;
  
            if (vm == null) return;
              
            if (!vm.Filter1.IsActive)
            {
                vm.Filter1.Operator = FilterOperator.Contains;
            }
  
            if (!vm.Filter2.IsActive)
            {
                vm.Filter2.Operator = FilterOperator.Contains;
            }
        }
  
    }

Then, in the code behind of the view,

public MyWindow(MyViewModel viewModel)
{
      DataContext = viewModel;
      this.radGrid.Columns[2].FilteringControl = new ContainsFilteringControl();
 }

After recompile and run the application, the filter changes to Contains.

However, when the filter is opened first time, the text boxes below the filter dropdowns are not shown.

When the filter window is opended the second time, the text boxes will appear.

Anything I can do to fix this?

Thanks
Rossen Hristov
Telerik team
 answered on 27 Nov 2012
1 answer
133 views
hi
i implement  Radtoolbar with basic functions but only copy undo and  cut commands are working . the others editingcommans and applicationcommand arn't working  sush as EditingCommands.DecreaseFontSize or increase
could you give me an example to implement it.
thanks by advance
Pavel R. Pavlov
Telerik team
 answered on 27 Nov 2012
4 answers
167 views
Hello,

I'm using internal build 2012.3.1017.40 and it seems the GridView is using the wrong locale (en-US instead of de-DE) when DataFormatString is applied to cells. Currency values are formatted as "$100.00" instead of "100,00 €". Is there a new configuration I have to set up or is it an issue with this build? I need to use the internal build because I'm using the WPF ReportViewer as well and there is that mean printing bug in the main release.

Kind regards
Markus
Markus Wolff
Top achievements
Rank 1
 answered on 27 Nov 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?