Telerik Forums
UI for WPF Forum
3 answers
131 views
I have a RadGridView that is working nicely, but  I have trouble with the expression Column:

1) I let the expression Column show via right mouse click. It is empty.
2) I click the Header of the Explession Column
3) RadGridView obviously tries to sort the empty Expression Column and  crashes with the CallStack posted below.

I want GridView to be stable, so whatever the user does it should not crash only because the Expression column is empty

How do I achieve this?



bei System.Linq.Expressions.Expression.Lambda(Expression body, String name, Boolean tailCall, IEnumerable`1 parameters)
bei System.Linq.Expressions.Expression.Lambda(Expression body, ParameterExpression[] parameters)
bei Telerik.Windows.Data.Expressions.SortDescriptorCollectionExpressionBuilder.Sort()
bei Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, IEnumerable`1 sortDescriptors)
bei Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, SortDescriptorCollection sortDescriptors)
bei Telerik.Windows.Data.QueryableCollectionView.get_FilterAndSortQueryableSourceCollection()
bei Telerik.Windows.Controls.GridView.GridViewDataControl.CreateAggregateResults()
bei Telerik.Windows.Controls.GridView.GridViewDataControl.CalculateAggregates()
bei Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Controls.DataControl.OnItemsCollectionChangedDispatch(Object sender, NotifyCollectionChangedEventArgs e)
bei System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
bei Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
bei Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
bei Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
bei Telerik.Windows.Data.QueryableCollectionView.RefreshInternal()
bei Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
bei Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
bei Telerik.Windows.Data.QueryableCollectionView.OnSortDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
bei System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
bei System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
bei Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target, Func`2 itemConverter)
bei Telerik.Windows.Data.CollectionHelper.Reset(IEnumerable source, IList target)
bei Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
bei Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
bei Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
bei System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
bei Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
bei Telerik.Windows.Controls.GridView.GridViewDataControl.PerformSorting(GridViewSortingEventArgs sortingArgs)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.<>c__DisplayClass9b.<Sort>b__9a()
bei Telerik.Windows.Controls.CursorManager.PerformTimeConsumingOperation(FrameworkElement frameworkElement, Action action)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.Sort(GridViewColumn column, Boolean appendToExisting)
bei Telerik.Windows.Controls.GridView.GridViewHeaderCell.RequestSort(Boolean appendToExisting)
bei Telerik.Windows.Controls.GridView.GridViewHeaderCell.PerformUserSort()
bei Telerik.Windows.Controls.GridView.GridViewHeaderCell.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.Run()
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei System.Windows.Application.Run(Window window)
bei System.Windows.Application.Run()
bei Roka3.App.Main() in C:\RZVN\Roka3\Roka3\obj\x86\Debug\App.g.cs:Zeile 0.
bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
Dimitrina
Telerik team
 answered on 03 Mar 2015
4 answers
100 views
My application contains a `RadGridView` control, which has the columns defined in the XAML.  The last column is a `GridViewImageColumn` that is bound to one of several different images in the program resources, based on the value of a property in the ViewModel object.  The images represent a quality of data enumeration: Good is a Green circle, OK is a Yellow circle, Bad is a Red circle, and N/A is a Grey circle.

Everything displays fine until you click on the Filter icon and open the filtering box.  What gets displayed at that point are the pack URIs to the image resources that are being displayed, not the images.  I'd rather have the images displayed, or a string that describes what the image represents (that is, Green / Yellow / Red / N/A).

How do I modify the control so it displays the images in the Filter box instead of the image URIs?
Tony
Top achievements
Rank 1
 answered on 03 Mar 2015
1 answer
164 views
I have one project (VS 2013, .NET 4.5, Tools 2014.3.1021.45)  where a RadRichTextBox is not shown. Looking for the properties in Visual Studio there is no ActiveEditorPresenter, no Style, no Template. The RRTB is one pixel high. Same when examining the properties during runtime. I have another project where these properties are set automatically, thus the RRTB is shown as expected.
Can you give me a hint where I should start searching for the error? All references are set, there is also a reference to an implicit style for RichTextBoxUI. The two projects differ in that one has all themes in a separat sub-project, the other one not. Could this be the error?

TIA
Neils
Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 03 Mar 2015
1 answer
59 views
Hi,

I'd like my Diagram's MeasurementUnit to be 11 pixels, but the Labels always display the interval in pixel units. Is there way to specify a custom MeasurementUnit? Or how would I go changing the LabelContainer style to do this?

Thanks!
Peshito
Telerik team
 answered on 03 Mar 2015
2 answers
220 views
Hi Everyone!

I wanna Draw LJ Chart with radChart controls, but one problem is:

How to customize axisY label like the attachment showing .

And thanks for anyway!
Martin Ivanov
Telerik team
 answered on 03 Mar 2015
3 answers
132 views
There is problem with the DataContext of children inside the GridView:
For some reason, the DataContext of the GridViewHeaderRow gets overwritten by a local value (of type System.Object). Therefore, the property is not inherited and it is not possible to bind to members of the GridView DataContext any more!

The value is overwritten in DataCellsPresenter.cs (the corresponding line marked bold), although I don't see any reason to do this:

public override void OnApplyTemplate()
{
    base.OnApplyTemplate();
 
    this.ItemsHost = this.GetTemplateChild("PART_ItemsHost") as Panel;
    GridViewRow gridViewRow = this.RadRowItem as GridViewRow;
 
    if (this.RadRowItem != null &&
        this.RadRowItem.GridViewDataControl == null)
    {
        this.RadRowItem.GridViewDataControl =
            this.RadRowItem.ParentOfType<GridViewDataControl>();
    }
 
    if (gridViewRow != null)
    {
        this.Item = gridViewRow.Item;
        gridViewRow.EnsureDataCellsPresenterSize();
    }
    else if (this.RadRowItem is GridViewHeaderRow)
    {
        this.Item = new object();
    }
    else if (this.RadRowItem is GridViewFooterRow)
    {
        this.Item = this.RadRowItem.GridViewDataControl.AggregateResults;
 
        this.TrackAggregatesChanges(this.RadRowItem.GridViewDataControl.AggregateResults);
    }
    else if (this.RadRowItem is GridViewGroupFooterRow)
    {
        this.Item = this.RadRowItem.Item;
    }
 
    // At the time that a Row is prepared we can't Sync because the CellsPresenter isn't created yet.
    // Doing it here ensures that the CellsPresenter is in the visual tree.
    this.SyncProperties();
 
    this.SetFrozenColumnSplitterPosition();
}
Ivan Ivanov
Telerik team
 answered on 03 Mar 2015
2 answers
657 views
Hi,
My Telerik control version is 2014.3.1202.40 and I'm using the Expression Dark theme.
I'd like to modify the color of menu item and it background when the menu item is highlighted (i.e. when the mouse is over). For example, in the attached screen dump, I'd like to set "Copy" to red, and its background to green. I try to find the colors in Telerik.Windows.Controls.Navigation.xaml, but don't know which item to change. Could you help me with that? Thanks.

Regards,
Gong
Vadimir
Top achievements
Rank 1
 answered on 03 Mar 2015
2 answers
176 views
hi I am seeing this problem just like this feedback posting http://feedback.telerik.com/Project/143/Feedback/Details/66990-on-smaller-resolution-the-datetimepickers-popup-is-showing-wrong

this is what we see below



any workaround for this? thanks.



Masha
Telerik team
 answered on 03 Mar 2015
1 answer
90 views
Hi.

Currently, I have two gridview.

one thing is page list.

another thing is items list about that.

I want to changed item list by selecting page list.

below my code.
----------------------------------------------------------------------------------------
void Selection(object selecteditem)
{
   .....
    if (ManagerType == AppType.Status)
        StatusTag.DataFilter(Page.PageItemList.Where(r => r.PageNum == pageNum).ToList());
    if (ManagerType == AppType.Analog)
        AnalogTag.DataFilter(Page.PageItemList.Where(r => r.PageNum == pageNum).ToList());
   ....
}
----------------------------------------------------------------------------------------

It's well behaving.

But it seems that memory crash.

Because pipe communication is disconnected.

Why occur that problem?

Ivan Ivanov
Telerik team
 answered on 03 Mar 2015
1 answer
108 views
My application contains a RadGridView control that is used to display search results.  The data displayed contains a property whose value is an enumerated value that represents the quality of GPS data contained in another property.  Values represent Good, OK, Bad, and Not Available (not the identifiers in the code, but just the idea).  This enumerated value is bound to a GridViewImageColumn; there is an IValueConverter class that converts the enumerated value into the pack URI for one of 4 different images in the program resources.  A green circle is used to represent Good, a yellow circle is used for OK, a red circle for Bad, and a grey circle for Not Available.

Everything displays find, but there is a problem when the users click on the Filter icon to display the Filtering pop-up.  In that case, what they see is the full URI to the images.  This just isn't right; I'd rather have the images themselves displayed, or a string that represents the state, or, if all else fails, just don't let the user filter on the column.

I know that I can implement the last option easily by setting the column's IsFiterable property to false, but I'd really like to get the Filter popup for this one case to display the image.  The control already has the URI, and using Snoop I was able to see that there is a template that includes a TextBox in use.  I need to override the template for this one column.  How do I do it?
Ivan Ivanov
Telerik team
 answered on 02 Mar 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
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?