Telerik Forums
UI for WPF Forum
3 answers
143 views
I use `RowValidating` event for `RadGridView`. It works fine with regular rows, but new row is not getting red when I set `e.IsValid = false;` However, error message displays properly.
What should I do to get it working?
Yoan
Telerik team
 answered on 19 Feb 2013
5 answers
188 views

An ArgumentNullException is thrown when editing items in a “grouped” grid.
It’s easily reproducible with a small WPF application containing the following files:

MainWindow.xaml

<Window x:Class="gridgroupingbug.MainWindow"
        Title="MainWindow" Height="350" Width="525">
    <StackPanel>
        <telerik:RadGridView
                            x:Name="_iniEntriesGrid"
                            ItemsSource="{Binding Path=IniEntryModels}"
                            SelectedItem="{Binding Path=SelectedIniEntry, Mode=TwoWay}"
                            AutoGenerateColumns="False"
                            AutoExpandGroups="True"
                            CanUserInsertRows="True">
            <telerik:RadGridView.GroupDescriptors>
                <telerik:GroupDescriptor Member="Scope" SortDirection="Ascending" />
                <telerik:GroupDescriptor Member="SectionName" SortDirection="Ascending" />
            </telerik:RadGridView.GroupDescriptors>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Scope}" Header="Scope" Width="3*"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=SectionName}" Header="Section" Width="3*"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Key}" Header="Key" Width="4*"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
        <Button Click="AddClicked">AddLine</Button>
    </StackPanel>
</Window>

MainWindow.xaml.cs

using System.Collections.ObjectModel;
using System.Globalization;
using System.Windows;
namespace gridgroupingbug
{
    public partial class MainWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            IniEntryModels = new ObservableCollection<IniEntryModel>();
            _iniEntriesGrid.DataContext = this;
            for (var i = 0; i < 2; i++)
            {
                IniEntryModels.Add(new IniEntryModel
                    {
                        Key = i.ToString(CultureInfo.InvariantCulture),
                        Scope = "MyScope1",
                        SectionName = "SomeSection",
                    });
            }
        }
        public ObservableCollection<IniEntryModel> IniEntryModels { get; private set; }
        private void AddClicked(object sender, RoutedEventArgs e)
        {
            IniEntryModels.Add(new IniEntryModel());
        }
    }
    public class IniEntryModel
    {
        public string Scope { get; set; }
        public string SectionName { get; set; }
        public string Key { get; set; }
    }
}

Telerik version: 2012.3.1129.40

Steps to reproduce:

  1.       Make sure you have at least two levels of grouping set in the grid (in our example, the first two columns)
  2.       Add a new item to the list bound to the grid’s ItemsSource (in our example, IniEntryModel)
  3.       Edit the newly added line (any column)
  4.       Move the focus to somewhere out of the grid (click in the button, for example), and an Exception is thrown.

Exception/Stack Trace:
System.ArgumentNullException was unhandled

  HResult=-2147467261

  Message=Value cannot be null.

Parameter name: element

  Source=Telerik.Windows.Controls

  ParamName=element

  StackTrace:

       at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Extensions\ParentOfTypeExtensions.cs:line 74

       at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext()

       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

       at Telerik.Windows.Controls.GridView.GridViewCell.HandlePendingEdit(UIElement focusedElement) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1021

       at Telerik.Windows.Controls.GridView.GridViewCell.HandlePendingEditOnLostFocus() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 899

       at Telerik.Windows.Controls.GridView.GridViewCell.Editor_LostFocus(Object sender, RoutedEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 930

       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.TextBoxBase.OnLostFocus(RoutedEventArgs e)

       at System.Windows.UIElement.IsFocused_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)

       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

       at System.Windows.Controls.TextBox.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.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)

       at System.Windows.DependencyObject.ClearValue(DependencyPropertyKey key)

       at System.Windows.Input.FocusManager.OnFocusedElementChanged(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.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value)

       at System.Windows.Input.KeyboardNavigation.UpdateFocusedElement(DependencyObject focusTarget)

       at System.Windows.FrameworkElement.OnGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs e)

       at System.Windows.Input.KeyboardFocusChangedEventArgs.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.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)

       at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)

       at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)

       at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)

       at System.Windows.UIElement.Focus()

       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonDown(MouseButtonEventArgs e)

       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)

       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 System.Windows.Application.Run()

       at gridgroupingbug.App.Main() in c:\lixo\gridgroupingbug\obj\Debug\App.g.cs:line 0

       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)

       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       at System.Threading.ThreadHelper.ThreadStart_Context(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.Threading.ThreadHelper.ThreadStart()

  InnerException:

Thanks!

PQ.

Maya
Telerik team
 answered on 19 Feb 2013
2 answers
258 views
Hello,

I have a program that uses the RtfFormatProvider.Import method.  This method is not able to extract the images embedded by Outlook rtf emails.

Steps to Replicate the problem.
1) Create a new Email in outlook.
2) Select Rich Text Format
3) Embed Image
...
(My program attempts the following...)
4) Retrieve RTF Text from email body.
5) Run RTFText through RtfFormatProvider.Import(string) method.
6) Display the generated RadDocument in a RadRichTextBox.

Result: Images are not visible.  Most likely due to the fact that outlook rtf doesn't list them as pictures, but as ole objects.

Is there any workaround or can this be placed on your todo list?

-Tayllor
Tayllor
Top achievements
Rank 2
 answered on 18 Feb 2013
0 answers
56 views
Hi everyone,

I would like to know if there is some way to create radio buttons styled like normal Windows buttons. Like the jquery: http://jqueryui.com/button/#radio

Thank you for your replies.
Patrik
Top achievements
Rank 1
 asked on 18 Feb 2013
15 answers
523 views
Hi

i just installed WPF Q3 2010, and tryed to create a new project.
The dropdown just below WPF settings is empty (guess i have to select installed version)
if i click on download button, it says no newer version found.
loading a simple online sample compiles and works as expected.
(WIN 7/64 Bit, VS 2010)

what i'm missing?

Missing User
 answered on 18 Feb 2013
5 answers
135 views
Hello, I have a little doubt has as above each column to create an empty row inside the grid proprio
to be used as a filter.

Ex. Imagine a data grid with 10 columns and the first row that is empty and editable, so that
fassa information entered into the filter of the selected column.

graciously
André
Maya
Telerik team
 answered on 18 Feb 2013
1 answer
105 views
Hello Telerik

In my appication I have a series of vertically stacked RichTextBoxes. What I would like to do is to detect if the Caret is on the first or last line in the document, so that I can move the the focus and set the Caret in the previous or next RTB, if the user ties to "walk out of a RTB". Hope this makes sense.

When debugging I noticed that in the RichTextBox.Document.CaretPosition there was a positionHandlerWalker.CanMoveUp and CanMoveDown property which kind of sounded what if am after, but it doesn't seem that the positionHandlerWalker property is available.

Hope you can help

/Terje
Petya
Telerik team
 answered on 18 Feb 2013
4 answers
170 views
hello guys,

I want to have 6 items and one target with different order

please check the attached picture.

meaning i want the area with the black border to be the target.
when i maximize the red item it will be in the black border area and the orange and yellow items minimized.

however, i want to keep the blue,brown and purple items to be to the right of the screen all the time.

when i maximize  the blue item, the full content should be in the black border and the blue,brow and purple items will remain the same

any ideas...


Zuhair
Top achievements
Rank 1
 answered on 18 Feb 2013
1 answer
122 views
Hi,

I just wanted to show each list item in list box as window portlet like flexible to maximize and minimize the listbox items.

Pleass suggest me how do i implement?
Yana
Telerik team
 answered on 18 Feb 2013
3 answers
387 views
Hi,

Let's say I have a combo box with these string items which must be in the following order:

"AZ"
"AA"

If I type 'A' when the combo box has focus, the text "AZ" will be selected.  I would prefer to have the auto-completion suggest matching values in alphabetical order, but there doesn't seem to be any way to do this.  Is there a way to do this out-of-the-box, and if not, is there a custom way I could accomplish this with a little more work?  I've tried handling the TextInput event but there seems to be a known bug in which that event is broken in current versions of the library.  Also, whatever solution I come up with needs to be able to work with both WPF and Silverlight versions of the control.

Thanks,
Mike Vargas
Ventzi
Telerik team
 answered on 18 Feb 2013
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?