Telerik Forums
UI for WPF Forum
2 answers
248 views
Hi,

I'm using WPF controls 2011.3.1220.40, and using a MVVM pattern with a ViewModel that uses DynamicObject to expose Model properties to the View.

Displaying dynamic property data in the gridview works fine, grouping on one of the real ViewModel properties works fine.  But when the user tries to group by one of the dynamic property columns, a null reference exception is thrown (stack trace below).  After the user clicks the grouping icon, TryGetMember is never called.

I've created a small project to demonstrate the issue, but could not upload a zip file.  So below I've pasted a .xaml and it's codebehind.   To see the problem, try grouping on the "One" column (works), and the "Two" column (exception).

I'm really hoping Telerik folks can look into this issue asap.

Thanks

MainWindow.xaml:
<Window
        x:Class="TestingGridViewControl.MainWindow"
        DataContext='{Binding RelativeSource={RelativeSource Mode=Self}}'
        >
    <Grid>
        <telerik:RadGridView ItemsSource='{Binding Items}' AutoGenerateColumns='False'
            EnableColumnVirtualization='True' IsReadOnly='True' >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header='One' DataMemberBinding='{Binding One}' />
                <telerik:GridViewDataColumn Header='Two' DataMemberBinding='{Binding Two}' />
                <telerik:GridViewDataColumn Header='Three' DataMemberBinding='{Binding Three}' />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
    </Grid>
     
</Window>

MainWindow.xaml.cs:
using System.Collections.ObjectModel;
using System.Dynamic;
using System.Reflection;
using System.Windows;
 
namespace TestingGridViewControl
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            SetData();
        }
 
        private void SetData()
        {
            Items = new ObservableCollection<ViewModel>
                        {
                            new ViewModel(new Model { Two = "2",  Three = "3",  }) {One = "1"},
                            new ViewModel(new Model { Two = "22", Three = "33", }) {One = "11"},
                        };
        }
 
        public ObservableCollection<ViewModel> Items { get; set; }
    }
 
    public class ViewModel : DynamicObject
    {
        private Model _model;
 
        public ViewModel(Model model)
        {
            _model = model;
        }
 
        public string One { get; set; }
 
        public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
            MethodInfo getMethod;
 
            // If VM has this property, VM takes precedence. 
            // Otherwise, check for property in the Model.
            var vmPropInfo = GetType().GetProperty(binder.Name);
            if (vmPropInfo != null && vmPropInfo.CanRead)
            {
                getMethod = vmPropInfo.GetGetMethod();
                result = getMethod.Invoke(this, null);
                return true;
            }
 
            var modelPropInfo = typeof(Model).GetProperty(binder.Name);
            if (modelPropInfo != null && modelPropInfo.CanRead)
            {
                getMethod = modelPropInfo.GetGetMethod();
 
                result = getMethod.Invoke(_model, null);
                return true;
            }
 
            result = null;
            return false;
 
        }
 
        public override bool TrySetMember(SetMemberBinder binder, object value)
        {
            MethodInfo setMethod;
 
            var vmPropInfo = GetType().GetProperty(binder.Name);
            if (vmPropInfo != null && vmPropInfo.CanWrite)
            {
                setMethod = vmPropInfo.GetSetMethod();
                setMethod.Invoke(this, new[] { value });
                return true;
            }
 
            var modelPropInfo = typeof(Model).GetProperty(binder.Name);
            if (modelPropInfo != null && modelPropInfo.CanRead)
            {
                setMethod = modelPropInfo.GetSetMethod();
                setMethod.Invoke(_model, new[] { value });
                return true;
            }
 
            return false;
        }
    }
 
    public class Model
    {
        public string Two { get; set; }
        public string Three { get; set; }
    }
}




----- Main Exception -----
Class: System.NullReferenceException
Message: Object reference not set to an instance of an object.
StackTrace:
   at Telerik.Windows.Controls.GridView.FilterEditorFactory.CreateEditor(Type type) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilterEditorFactory.cs:line 55
   at Telerik.Windows.Controls.GridViewBoundColumnBase.CreateFieldFilterEditor() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.Filtering.cs:line 106
   at Telerik.Windows.Controls.GridView.FilteringControl.CreateFieldFilterEditor(GridViewBoundColumnBase column) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringControl.cs:line 268
   at Telerik.Windows.Controls.GridView.FilteringControl.PrepareFieldFilters(GridViewBoundColumnBase column) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringControl.cs:line 256
   at Telerik.Windows.Controls.GridView.FilteringControl.Prepare(GridViewBoundColumnBase column) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringControl.cs:line 247
   at Telerik.Windows.Controls.GridView.FilteringDropDown.PrepareFilteringControl() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 266
   at Telerik.Windows.Controls.GridView.FilteringDropDown.OnDropDownPopupOpened(Object sender, EventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 365
   at System.Windows.FrameworkElement.RaiseClrEvent(EventPrivateKey key, EventArgs args)
   at System.Windows.Controls.Primitives.Popup.OnOpened(EventArgs e)
   at System.Windows.Controls.Primitives.Popup.CreateWindow(Boolean asyncCall)
   at System.Windows.Controls.Primitives.Popup.OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   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 System.Windows.Controls.Primitives.Popup.set_IsOpen(Boolean value)
   at Telerik.Windows.Controls.GridView.FilteringDropDown.OnIsDropDownOpenChanged(Boolean oldValue, Boolean newValue) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 129
   at Telerik.Windows.Controls.GridView.FilteringDropDown.OnIsDropDownOpenChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 75
   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.FilteringDropDown.set_IsDropDownOpen(Boolean value) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 64
   at Telerik.Windows.Controls.GridView.FilteringDropDown.OnDropDownButtonClick(Object sender, RoutedEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 378
   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.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Primitives.ToggleButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   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)
Eric
Top achievements
Rank 1
 answered on 02 Feb 2012
2 answers
133 views
We have a Gridview used with column one as the checkbox for selection. ON mouse hover of the checkbox the theme color looks blue which is as desired. But when the checkbox is selected, it turns grey or it does not attain the theme feature. How do we make it theme specific color on selection?
Bhakti
Top achievements
Rank 1
 answered on 02 Feb 2012
1 answer
151 views
Will the upcomming release of chartview support exporting the chart to image lik the chart does? I´m considering switching to chartview because of performance issues with chart, but need to know whether export will be supported.

Tsvetie
Telerik team
 answered on 02 Feb 2012
3 answers
84 views
Hi, 

I use the AppointmentCalendarExporter behind a WCF service to produce an ICal stream. This is then imported as a subscription to Outlook. 

When an appointment has a recurrence pattern that is every 2 days (See the attached example). it produces the following output (just for that appointment)

BEGIN:VEVENT
DTSTART;TZID=E. Australia Standard Time:20111225T050000
DTEND;TZID=E. Australia Standard Time:20111225T120000
SUMMARY:Test recurrence
UID:a49ee7e8-7813-4348-b7d7-0fdba1934521
IMPORTANCE:None
RRULE:FREQ=DAILY;UNTIL=20120103T020000Z;INTERVAL=2;BYDAY=SU,MO,TU,WE,TH,FR,
 SA
END:VEVENT

However, this can't be imported into Outlook. There is a conflict in the recurrence rule, between FREQ and BYDAY. If I remove the BYDAY, then it gets imported ok.

I think this is a bug. 

Phil
Rosi
Telerik team
 answered on 02 Feb 2012
1 answer
109 views
I have a RadDataForm and I have added a RadRichTextEditor via the autogeneratingfield event. I set the RadRichTextEditor to read only. My question is that during the edit ending event how can I find my RadRichTextEditor and unset the read only?
Pavel Pavlov
Telerik team
 answered on 02 Feb 2012
4 answers
215 views
When editing a cell and pressing Enter I get exception below. Of course I might do something that most people don't but I can't really see what it should be. The exception is rather specific below -- would you consider handling this situation with a bit more information to the developer? I'm available for trying out unofficial builds if that could be helpful for you.

I'm currently on the latest release.

Thanks,
Anders, Denmark

System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Windows.Controls.GridView
  StackTrace:
       at Telerik.Windows.Controls.GridView.GridViewCell.SetCellElement() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 508
       at Telerik.Windows.Controls.GridView.GridViewCell.HideEditor() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 744
       at Telerik.Windows.Controls.GridView.GridViewCell.ToggleEditor() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1057
       at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCellEditModeChanged(GridViewCell cell, Boolean newIsInEditMode) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 396
       at Telerik.Windows.Controls.GridView.GridViewCell.IsInEditModeChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1045
       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\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 305
       at Telerik.Windows.Controls.GridView.GridViewCell.RaiseCellEditEndedEvent(GridViewEditAction editAction) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1156
       at Telerik.Windows.Controls.GridView.GridViewDataControl.PerformCellEditEnded(GridViewCell currentCell) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 108
       at Telerik.Windows.Controls.GridView.GridViewDataControl.CommitCellEdit(GridViewCell currentCell, Boolean isLeavingRow) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 69
       at Telerik.Windows.Controls.GridView.GridViewDataControl.CommitEdit() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Editing.cs:line 1011
       at Telerik.Windows.Controls.GridView.GridViewDataControl.OnCommitEditCommand(Object sender, ExecutedRoutedEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 289
       at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
       at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
       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.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
       at System.Windows.Input.RoutedCommand.Execute(Object parameter, IInputElement target)
       at Telerik.Windows.Controls.GridView.GridViewDataControl.ExecutePendingCommand() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.Commands.cs:line 65
       at Telerik.Windows.Controls.GridView.GridViewDataControl.PendAndExecuteCommands(KeyEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 4112
       at Telerik.Windows.Controls.GridView.GridViewDataControl.OnKeyDown(KeyEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 4085
       at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)
       at System.Windows.Input.KeyEventArgs.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.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
       at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
       at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
       at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
       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 System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
       at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)
       at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(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 Rap1D.Rap1D_WPF.App.Main() in C:\SVN\Rap1DGui\trunk\src\Rap1D_WPF\obj\x86\Debug\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:
Anders
Top achievements
Rank 1
 answered on 02 Feb 2012
3 answers
170 views
I want users to be able to tab into a cell of a hyperlink column and edit the url when a row is in edit mode. Since the GridViewDynamicHyperlinkColumn is read-only, I thought I could subclass it to provide an edit textbox. But I can't override CanEdit because you've made it internal. Is there a reason for this? I've worked around it by subclassing GridViewBoundColumnBase and reimplementing stuff from the hyperlink column. If you could remove the internal specifier from CanEdit, it would help avoid unnecessary duplication.
Marc Roussel
Top achievements
Rank 2
 answered on 02 Feb 2012
1 answer
240 views
I have a tab control with 2 tabs.  the first has a telerik wpf gridview and the other has an out of the box msft datagrid.
when selecting the tabs the tab with the datagrid shows much faster than selecting the tab with the gridview. the datasources are exactly the same, both xaml views use the same viewmodel.  the grids have the same columns and same resources.  it seems that the gridview is calling IDataErrorInfo.Item on each of the items in the datasource when the tab is selected.  Why?  Is there a way to prevent this?

Thanks,
Nick
Yordanka
Telerik team
 answered on 02 Feb 2012
3 answers
237 views
Hi,

I have a horizontal oriented scheduleview. I want to set a smaller width-property to the appointments. I tryed MinAppointmentWidth but nothing happend. The appointments are 100px? and i must scroll horizontal to see the second half of the day. I tried viewbox, but the then the scheduleview is too small to read. I had set MinTicks = 1h and MajTicks 6h. So the MinTick column could be 10 or 20px.
Can I set the width in the template? Where?

Thanks,
Annett
Konstantina
Telerik team
 answered on 02 Feb 2012
0 answers
88 views
Hi,

I would like to change the color of the header cell of the toggle button column in RadGridView.

Please find attached the image with the indication of the area i would like to style. I would like to change it to Red to maintain consistency with the color of the rest of the GridViewHeaderColumn cells.
Zubair
Top achievements
Rank 1
 asked on 02 Feb 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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?