Telerik Forums
UI for WPF Forum
2 answers
155 views
In the method signature for the event handler for the event 'Edited' there are the following parameters: ( object sender, RadTreeViewItemEditedEventArgs e ).

How can I get the RadTreeViewItem that is being edited? e.OriginalSource returns an 'EditableHeaderedItemsControl' and sender returns the RadTreeView. Is there something I am missing?

Thank you.

EDIT:

OK, I was able to cast e.OriginalSource to RadTreeViewItem. The problem that I am encountering is that I want to delete the node if its header is empty. So inside the Edited event handler I have the following code:

item.ParentItem.Items.Remove(item); 

I get the following null exception:

   at Telerik.Windows.Controls.RadTreeViewItem.CommitEdit() in c:\Builds\WPF_Scrum\Navigation_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.cs:line 718
   at Telerik.Windows.Controls.RadTreeView.HandleItemSelectionFromUI(RadTreeViewItem treeViewItemToSelect) in c:\Builds\WPF_Scrum\Navigation_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeView.cs:line 2196
   at Telerik.Windows.Controls.RadTreeViewItem.OnHeaderMouseLeftButtonDown(Object sender, MouseButtonEventArgs e) in c:\Builds\WPF_Scrum\Navigation_WPF\Sources\Development\Controls\Navigation\TreeView\RadTreeViewItem.Events.cs:line 790
   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.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
   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.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, Int32 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, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   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.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()


Ziad
Top achievements
Rank 1
 answered on 11 Jan 2010
7 answers
120 views
I have a project that I'm deving from scratch.

SQL database
wpf and web
stock/inventory  - ordering, tracking

anybody interested in helping me out..  
Vlad
Telerik team
 answered on 11 Jan 2010
1 answer
83 views
I want to initiate sort on the grid from code.  I am not having success.

This is what I've tried:

gvDocumentListing.Columns[4].SortingState = Telerik.Windows.Controls.SortingState.Descending;

 

gvDocumentListing.Rebind();



This does not work.  I saw in an earlier post that some one called Columns.Reset().    This method appears to have been removed.
Vlad
Telerik team
 answered on 11 Jan 2010
5 answers
87 views

Good morning

I am developing an application WPF touchscreen, I need to have scrolling programatically.
The example 117850_117835 if it works to me, but with Q3 displays error in the following line.

Panel = Me.RadGridView1.ItemsControl.VirtualizingPanel

'temsControl' is not a member of 'Telerik.Windows.Controls.RadGridView'
As it works in the Q3

Thanks

Vlad
Telerik team
 answered on 11 Jan 2010
6 answers
136 views

Is there a way to determine the actual position of a RadTileViewItem in a RadTileView? Something like
RadTileView.GetPosition(RadTileViewItem item, out int row, out int column)?

Thanks,
Michael

Tihomir Petkov
Telerik team
 answered on 10 Jan 2010
7 answers
167 views
Hi,

I've created a treeview which has the TriStateMode enabled and defined a callback function when an item were checked/unchecked.

My problem is that I get notified multiple times if a subitem was checked. The first notification is for the top element, and the next notification is for the top level's child element and so on... The last notification is the checked item itself.

Is there a way to determine the item which was checked?

Thanks
Dieter
Valentin.Stoychev
Telerik team
 answered on 08 Jan 2010
1 answer
70 views
Hello :)
Exists pt-br resource for WPF controls?
Valentin.Stoychev
Telerik team
 answered on 08 Jan 2010
2 answers
79 views
I have a gridview, using version 2009.3.1208.35 and MVVM. Style and visibility is applied like the following:
        <telerik:RadGridView.Resources> 
            <Style TargetType="{x:Type GridView:GridViewRow}"
                <Setter Property="Background" Value="#FFFFe1" /> 
                <Style.Triggers> 
                    <DataTrigger Binding="{Binding Path=OperationId}" Value="0"
                        <DataTrigger.Setters> 
                            <Setter Property="Background" Value="#FFFFFF" /> 
                        </DataTrigger.Setters> 
                    </DataTrigger> 
                    <DataTrigger Binding="{Binding Path=OperationStatus}" Value="9"
                        <DataTrigger.Setters> 
                            <Setter Property="Visibility" Value="Collapsed" /> 
                        </DataTrigger.Setters> 
                    </DataTrigger> 
                </Style.Triggers> 
            </Style> 
        </telerik:RadGridView.Resources> 
 
Everything looks fine when the grid is loaded, but, if I scroll vertically, it seems like <Setter Property="Visibility" Value="Collapsed" /> doesn't work anymore. No more rows are collapsed. Is this is a bug, or am I missing something?

Roy
Roy Halvorsen
Top achievements
Rank 1
 answered on 08 Jan 2010
1 answer
153 views
Hello,

The column of my grid is set to SizeToContent, which of course causes my column size to increase to the size of the lengthiest data in the column, which is great. When the row is removed, however, the column remains at that extended size. I would like to be able to have my column automatically "snap back" to the next lengthiest bit of data remaining in the grid, but have been unable to find a way to accomplish this with any of the existing properties. Is there a way to accomplish this kind of behaviour I'm missing?

Thanks,

Dave
Pavel Pavlov
Telerik team
 answered on 08 Jan 2010
3 answers
585 views
I have a RadTabControl with a Custom ContentTemplate. It works fine, and displays the content as I'd expect when first viewing the tab. However, when changing from one tab, back to the original tab, I find that the data inside the content presenter is no longer being displayed. It appears as if the DataContext or ItemsSource binding is no longer being applied as I'd expect.

Below is a short expample which should illustrade what I'm seeing. I'm using MVVM, and the ClosedOrderCol in the code snippet below is an ObservableCollection on the ViewModel.

Any help would be appreciated.

<Navigation:RadTabControl> 
            <Navigation:RadTabControl.ItemContainerStyle> 
                    <Setter Property="ContentTemplate"
                        <Setter.Value> 
                            <DataTemplate>
                                <Grid>
                                   <ContentPresenter Content="{TemplateBinding Content}"/>
                                </Grid>
                            </DataTemplate> 
                        </Setter.Value> 
                    </Setter> 
            </Navigation:RadTabControl.ItemContainerStyle> 
            <Navigation:RadTabItem> 
                    <Controls:RadGridView Grid.Row="1" ItemsSource="{Binding ClosedOrderCol}" IsReadOnly="True"
                        <Controls:RadGridView.Columns>                        
                           <Controls:GridViewDataColumn Header="Closed" DataMemberBinding="{Binding DateClosed}" /> 
                        </Controls:RadGridView> 
            </Navigation:RadTabItem> 
            <Navigation:RadTabItem /> 
<Navigation:RadTabControl> 

Kiril Stanoev
Telerik team
 answered on 08 Jan 2010
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?