Telerik Forums
UI for WPF Forum
1 answer
106 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
201 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
158 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
227 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
218 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
77 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
1 answer
484 views
I am populating a RadTabControl in the code-behind, and it's bound to a property called SelectedBottomTab.

Here's the XAML
<telerik:RadTabControl x:Name="tabBottomTabPanel"
                        Grid.Row="2"
                        ItemsSource="{Binding BottomTabs}" 
                        SelectedItem="{Binding SelectedBottomTab}">
</telerik:RadTabControl>

then in the code behin I create the tabs:

private ObservableCollection<RadTabItem> _BottomTabs;
public ObservableCollection<RadTabItem> BottomTabs
{
    get { return _BottomTabs; }
    set
    {
        if (_BottomTabs != value)
        {
            _BottomTabs = value;
            RaisePropertyChanged("BottomTabs");
        }
    }
}
  
private RadTabItem _SelectedBottomTab = null;
public RadTabItem SelectedBottomTab
{
    get { return _SelectedBottomTab; }
    set
    {
        if (_SelectedBottomTab != value)
        {
            _SelectedBottomTab = value;
            RaisePropertyChanged("SelectedBottomTab");
        }
  
    }
}

and
private void setupBottomTabs()
{
    RadTabItem tabA = new RadTabItem { Header = "Tab A" };
    RadTabItem tabB = new RadTabItem { Header = "Tab B" };
    RadTabItem tabC = new RadTabItem { Header = "Tab C" };
  
    BottomTabs = new ObservableCollection<RadTabItem>();
    BottomTabs.Add(tabA);
    BottomTabs.Add(tabB);
    BottomTabs.Add(tabC);
}

When change tabs the SelectedBottomTab property set it not firing.



Petar Mladenov
Telerik team
 answered on 02 Feb 2012
4 answers
277 views
Using the following class to manage data conversion between a scheduleview and listbox:

using Telerik.Windows.Controls.ScheduleView;
using Telerik.Windows.DragDrop.Behaviors;
 
namespace DragDrop
{
    public class AppointmentConverter : DataConverter
    {
        /// <summary>
        /// Returns a list of all formats that the data in this data object can be converted to.
        /// </summary>
        public override string[] GetConvertToFormats()
        {
            string assemblyName = typeof(Appointment).AssemblyQualifiedName;
            return new string[] { assemblyName };
        }
 
        /// <summary>
        /// Retrieves a data object in a specified format; the data format is specified by a string.
        /// </summary>
        public override object ConvertTo(object data, string format)
        {
            if (DataObjectHelper.GetDataPresent(data, typeof(ScheduleViewDragDropPayload), false))
            {
                ScheduleViewDragDropPayload payload = (ScheduleViewDragDropPayload)DataObjectHelper.GetData(data, typeof(ScheduleViewDragDropPayload), false);
 
                if (payload != null)
                {
                    return payload.DraggedAppointments;
                }
            }
            return null;
        }
    }
}

I cannot drag a CustomAppointment (as coded in the Telerik Demo)
back to a list box from a schedule view. No exception or error,
it just simply doesn't let me (cursor icon changes to a 'not
permitted' icon).
Daniel
Top achievements
Rank 1
 answered on 02 Feb 2012
2 answers
106 views

I want the menus of my RADMenu to appear instantly. 

No scrolling or fading in - the menus should just pop up instantly when I click on a RadMenuItem.

What is the most simple way to do this?

Peter
Top achievements
Rank 1
 answered on 02 Feb 2012
1 answer
410 views

In the following piece of code I'm loading some RTF text into a telerik RadRichTextBox. Does anyone know how to set the text control to wrap the text to the box width? Take into account that the sample code is part of a DataTemplate in the resources section of a window, therefore variable _reportRTFBox is not available in window code behind

<Grid>
<Grid.RowDefinitions>
    <RowDefinition/>
    <RowDefinition />
</Grid.RowDefinitions>
<telerikProvider:RtfDataProvider
    Grid.Row="1"
    Rtf="{Binding ReportToDistributeRTF}"
    RichTextBox="{Binding ElementName=_reportRTFBox}" />
<telerik:RadRichTextBox
    Grid.Row="0"
    x:Name="_reportRTFBox"
    MaxHeight="200"
    ScrollViewer.VerticalScrollBarVisibility="Auto"
    ScrollViewer.HorizontalScrollBarVisibility="Auto"
    IsReadOnly="True"/>

Many thanks,

Juanjo

Boby
Telerik team
 answered 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
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
Security
VirtualKeyboard
HighlightTextBlock
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?