Telerik Forums
UI for WPF Forum
2 answers
132 views

Hi everyone.

I hate to post stacktraces without details on how to replicate, but I'm in one of those "impossible to consistently replicate but get enough error reports that it's starting to drive me insane" kind of situations.  Every so often, I get this unhandled exception that crashes an application with a rapidly updating RadGridView.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.GridView.GridViewCell.UpdateValue()
   at Telerik.Windows.Controls.GridView.GridViewCell.SetCellElement()
   at Telerik.Windows.Controls.GridView.GridViewRow.PrepareCell(GridViewCellBase cellBase, GridViewColumn column)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.PrepareCell(GridViewCellBase cell, GridViewColumn column)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GetVirtualizedCell(GridViewColumn column, Boolean createIfNull)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.RealizeAndMeasureCells(Int32 startIndex, Int32 predictedLastIndex, Func`2 calculateNextIndex)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.UpdateVirtualizedCells()
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   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.LegacyInvokeImpl(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 APSSGuardianAVL.App.Main()

 

Posting this in hopes that someone has seen it before, or admins know this is a bug that has been addressed.

Thanks.

intellitechcorporation
Top achievements
Rank 1
 answered on 12 Oct 2015
5 answers
346 views

Hi,

I have a RadTileList which fills the entire width of the screen. By default it has a right padding (50px I guess which is perfect) and I would like to add the same on the left exactly the same way it's done in the demo app.

But I can't find where it's defined, I'm stuck in my research in RadTileListTemplate # ItemsPresenter

 Thanks,

Rémi.

Maya
Telerik team
 answered on 12 Oct 2015
1 answer
1.0K+ views

Hello,

I am attempting to retain the position of the scroll position of the RadGridView depending on the action being performed by the user during a ReBind() event.  I found a solution presented already before but I am having problems implementing it: http://www.telerik.com/forums/scrollviewer-in-radgridview.  It only seems to work intermittently.  Even though the contents and row count are not changing, sometimes the scroll stays perfectly still as expected, sometimes nudges slightly, sometimes jumps 5-10 rows losing focus on whatever the user was doing and confusing them.  Oddly it always seems to work on subsequent Rebind() events unless the user adjusts the scroll position again and the problem begins to repeat.  Is there anything that can be done to prevent or fix this unpredictable ​behavior?

 

var scrollViewer = this.radGridView.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault();
//Get horizontal and vertical offsets
var horizontalOffset = scrollViewer.HorizontalOffset;
var verticalOffset = scrollViewer.VerticalOffset;
     
//Set horizontal and vertical offsets   
scrollViewer.ScrollToHorizontalOffset(horizontalOffset);
scrollViewer.ScrollToVerticalOffset(verticalOffset);

 

 

 

Ivan Ivanov
Telerik team
 answered on 12 Oct 2015
3 answers
152 views

so i have RadScheduleView and RadCalendar, SelectedDate and CurrentDate is bound so when i change the dates in calendar, it will also change in ScheduleView.

here's the problem, i want to make another ScheduleView with the same appointment but when i add it, both ScheduleView's CurrentDate is no longer bound to the SelectedDate, why?

and how can i make a Hourly View Appointment? it's like i want to make the 2nd ScheduleView to Hourly so i have an option to open it from the 1st ScheduleView (Day View). for example when i click the slot/appointment at 1:00 time, i will be able to go to 2nd ScheduleView that have timer 1:10 1:20 ... 1:50 something like that so i can make appointment per-10min.

Nasko
Telerik team
 answered on 12 Oct 2015
5 answers
154 views

Hi,

 

I have RadGridView binded to QueryableEntityCollectionView. I want to sort only items on current page by click on column header, not  full data from server.

I was trying to sort items in GridView_Sorting event, set e.NewSortingState  and e.Cancel = true but without any success. Can't access and sort items from current page.

 

Any help?

Ivan Ivanov
Telerik team
 answered on 12 Oct 2015
8 answers
724 views
Are y'all still working on this one?

System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=WatermarkTextBox'. BindingExpression:Path=ActualWidth; DataItem=null; target element is 'AutoCompleteBoxesWrapPanel' (Name=''); target property is 'Width' (type 'Double')

It really is annoying when one is trying to make sure that any and all binding errors in the output window are gone.  It would be nice if you guys could rid us of these please.   Or is there something I can do to suppress or get rid of these? 

Thanks
Paul
Nasko
Telerik team
 answered on 12 Oct 2015
1 answer
375 views

Hi,

I'm having big troubles with the AutoCompleteBox control.

My view has a RadGridView with its ItemsSource binded to an ObservableCollection of objects. One column of this GridView contains an AutoCompleteBox that works well. But this AutoCompleteBox produces the following errors at runtime:

System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=WatermarkTextBox'. BindingExpression:Path=ActualWidth; DataItem=null; target element is 'AutoCompleteBoxesWrapPanel' (Name=''); target property is 'Width' (type 'Double')​

I found several threads about that. They basically say that it's no big deal, "just ignore it", or disable the errors with a piece of code in the code behind. (http://www.telerik.com/forums/autocomplete-watermark-binding-error)

 My problem is that, it is actually pretty bad for performance. For example, when I'm scrolling horizontally in my GridView, and I get to the column where my AutoCompleteBox is, the GridView freezes for a second, and stops scrolling. That's one thing.

The second thing is, my GridView has the Virtualization turned off for some reasons. That means, when my GridView is rendered, those errors are produced for EVERY line of my GridView, and the application freezes until all errors are outputed. That makes the application unusable when dealing with a big number of lines (1000 to 10 000 in my case).

Has anyone fixed this issue somehow ?

Thanks.

Nasko
Telerik team
 answered on 12 Oct 2015
2 answers
182 views

Hi,

 I'm surely doing something wrong, but I can't get the content of the BusyIndicator to display. This is what I have:

 <Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApplication1"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <telerik:RadBusyIndicator IsBusy="False">
        <TextBlock>Hello there</TextBlock>
    </telerik:RadBusyIndicator>
</Window>

When running the app a blank window comes up. Removing the busy indicator shows "Hello there".

What am I doing wrong?

Thanks,

Adrian

 

p.s.: I'm running the 2015.3.930.45 version of the controls

Kalin
Telerik team
 answered on 12 Oct 2015
3 answers
130 views

Hi there,

I have a grid where I'm setting the first column frozen, hardcoding FrozenColumnCount="1" in the XAML.  I'm also allowing the user to reorder columns, but I don't want them to be able to move a column to the left of the frozen one, so I only ever have that 1 column frozen, is this possible?  Thanks!

Yoan
Telerik team
 answered on 12 Oct 2015
1 answer
306 views

Hello, my Version=2015.3.930.45

I'm trying to show a list of items.

With usual ItemsControl it works fine (or any another control) - see pic 4

But with Carousel it shows empty items at the start and at the end.

After control loads up it shows nothing at all (if amount of items is less then ~5) - pic 1

Then I click "right" button and it shows only one item at the end - pic 2

I can scroll through the items to the empty items at the end - pic 3

 If amount of items is greater then 5 - it shows them, but there are still empty items at the beginning and at the end.

I'm setting ItemsSource to an array of my items and there no nulls or anything unexpectable in the array.

Is it only problem of mine?

Maya
Telerik team
 answered on 12 Oct 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?