Telerik Forums
UI for WPF Forum
5 answers
1.3K+ views
Hi there,

In this link http://www.telerik.com/community/code-library/wpf/general/mvvm-context-amp-row-doubleclick-functionality.aspx, it is using the CommandBindingBehavior to bind the MouseDoubleClick event. The Problem is the the even fires when dbl clicking the header or scrollbar.

How can I make it fire when the actual row or cell is double clicked?

Thanks!

May
Chris
Top achievements
Rank 1
Iron
 answered on 25 Apr 2021
1 answer
175 views

Hi.

I think I have a problem with binding.

I use a RadGridView with 3 columns and binding. I set DataContext in code behind and use it in binding here.

I also use TextBlockWithSearchProperty. It's common  TextBlock with my custom property SearchText, it works normally.

The problem is that GridView create a few TextBlockWithSearchProperty objects and  view works normal. I can see a data that I show in view, but in code behind  property Text (TextBlockWithSearchProperty) is equal to "" and DataContext is equal to null. I don't understand why?

How can I fix it? Or what I do wrong?

<telerik:RadGridView Name="GridView"  Margin="5" 
                              AutoGenerateColumns="False" ItemsSource="{Binding Path=SelecteDay.Items}">


            <telerik:RadGridView.Columns>

                <telerik:GridViewDataColumn Header="Time"

                                            DataMemberBinding="{Binding Time, StringFormat=\{0:hh\\:mm\}}"
                                            CellEditTemplate="{StaticResource TimePicker}" Width="100" />


                <telerik:GridViewDataColumn Header="Text" x:Name="TextColumn" 
                                            DataMemberBinding="{Binding Text, UpdateSourceTrigger=PropertyChanged}" 
                                            Width="*"  IsFilterable="True" FilterMemberPath="Text"> 
                    
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate >
                            <infrastructure:TextBlockWithSearchProperty Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                                                        SearchText="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadGridView}},                                                                                                Path=DataContext.SearchText, Mode=OneWay}"
                                                                        d:DataContext="{Binding}" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>

        </telerik:RadGridView>

Chris
Top achievements
Rank 1
Iron
 answered on 25 Apr 2021
4 answers
395 views

Hello,

I'm using the Progress Telerik UI for WFP sample application (R1 2021 SP1) to review the capabilities of RadNotifyIcon.

Unfortunately, the balloon features are not working at all for me. For example, navigating to the "Notify Icon Configurator" sample app, the "Show balloon" and "Hide balloon" both do nothing.

Everything else seems fine - the icon is visible, and the popup features are working. Just the balloon messages are not.

I'm running the latest build of Windows 10 with two 4k monitors are 200% scaling.

Any thoughts on a fix or workaround would be appreciated.

- Mark R.

Vladimir Stoyanov
Telerik team
 answered on 23 Apr 2021
6 answers
1.2K+ views
Hi,

I am new to WPF, I am using MVVM pattern in WPF and generating a Datatable structure at the runtime, then binding Datatable with RadGridView, which is working as expected.

Problem: I want RadGridView configurable (where user can add new row, delete row and edit the data) and on save button click everything should be saved in the database. I am able to bind existing data from the Datatable to RadGridView, but not able to edit, delete or add new rows. I have set "True" value for CanUserDeleteRows and CanUserInsertRows. I am not sure where I am going wrong.

In one of the Telerik blog, I read that we should bind Dataview to RadGridView (as Dataview inplements INotifyPropertyChanged), but if I do that then my RadGridView appears to be empty everytime (not even show coloumns).

Any help will be highly appreciated.

Thanks in advance!
Vladimir Stoyanov
Telerik team
 answered on 23 Apr 2021
2 answers
227 views

Hello Community.

Is it possible to use Telerik UI with ARIA for WPF / XAML / VB without using ASP.NET or Silverlight?

We're looking for a solution to read ARIA tags with JAWS Screen Reader from a Desktop Application.

Greetings

Jürgen

Jürgen
Top achievements
Rank 1
 answered on 23 Apr 2021
2 answers
209 views

Hi Team,

We are facing the below exception in our applicaiton. Currently we are using version 4.0 telerik radtreeview in our application . can you please confirm whether it is related version issue or any other reason and  How to resolve this issue?

Stack Trace:
Timestamp: 3/23/2021 15:58:17           Message: HandlingInstanceID: c392afd7-c81e-4acf-86d3-2bc248a1b9ab
An exception of type 'System.NullReferenceException' occurred and was caught.
-----------------------------------------------------------------------------
03/23/2021 11:58:17
Type : System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : AUID = 724 - Object reference not set to an instance of an object.
Source : PresentationFramework
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Remove(System.Windows.Controls.Primitives.GeneratorPosition, Int32, Boolean)
HResult : -2147467261
Stack Trace :    at System.Windows.Controls.ItemContainerGenerator.Remove(GeneratorPosition position, Int32 count, Boolean isRecycling)
   at Telerik.Windows.Controls.TreeView.TreeViewPanel.CleanupRange(IList children, IItemContainerGenerator generator, Int32 startIndex, Int32 count)
   at Telerik.Windows.Controls.TreeView.TreeViewPanel.CleanupContainers(Int32 firstViewport, ItemsControl itemsControl)
   at Telerik.Windows.Controls.TreeView.TreeViewPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at Telerik.Windows.Controls.RadTreeViewItem.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.TreeView.TreeViewPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

Thanks,

Srinivasan

Uma
Top achievements
Rank 1
 answered on 23 Apr 2021
0 answers
208 views

Hi,

it took me a while to find out the actual behavior of the GridView, but I think I got and now and would just like to point out a misleading example and ask if I've misunderstood something.

When attaching to the RadGridView.SelectedCellsChanged-event, I get the following behavior:

1.  When a complete row was selected and the grid is sorted/grouped, I receive a SelectedCellsChanged-event with the newly added cells (all cells of the row). However, the GridViewSelectedCellsChangedEventArgs do not contain the removed cells. Is this by design because the removed GridViewCellInfo-instances are no longer part of the updated grid?

2.  When only single cells were selected and the grid is sorted/grouped, the selection of these cells seem to be cleared. However, I do not receive a SelectedCellsChanged-event. This is okay for me, as I can still listen to

  • the RadGridView.Sorted-event 
  • the RadGridView.Grouped-event

and clean up my ViewModel-CellSelection there. But this leads to the misleading example "Grid View - Selection" in the WPF Controls Examples suite. Here, the SelectedCellsBindingBehavior.cs only listens to the SelectedCellsChanged-event, which results in cells still being listed in the "Selected cells:"-Listbox of the example after a sorting operation, although they are no longer selected.

 

Greetings,

Andree

 

 

Andree
Top achievements
Rank 1
 asked on 22 Apr 2021
15 answers
184 views

Hi,

If a button is placed in a RadMenu that causes navigation (in a Frame/Page setup), then the button is not getting focus and hence any Bindings that are present where the focus is are not executed before navigation takes place.  I see https://www.telerik.com/forums/radmenu-problem-404186d89499 and https://www.telerik.com/forums/i-think-i-found-a-nasty-bug which look like the same problem.  Is there any solution for this problem aside from not using RadMenu that will work for the focus being in any control?  I note that in Silverlight RadMenu does not have this problem. 

Vladimir Stoyanov
Telerik team
 answered on 22 Apr 2021
37 answers
660 views

Hi all 

I have a ListBox and its has Items to be Displayed. Additional i have added 

 <telerik:ListBoxDragDrop.Behavior> // for dragging operation
<telerik:ListBoxDragDropBehavior AllowReorder="True" telerik:TouchManager.DragStartTrigger="TapHoldAndMove" />
</telerik:ListBoxDragDrop.Behavior>
            
<telerik:ListBoxDragDrop.DragVisualProvider> //// for dragging Visual operation
<telerik:ScreenshotDragVisualProvider />
</telerik:ListBoxDragDrop.DragVisualProvider>

Any idea to Restrict the Dragging-Visual within the parent windows bounds.

Thanks In Advance

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Apr 2021
1 answer
461 views

Hi,

 

I am using the RadSplashScreen and I would like to allow the following actions:

- Set splashscreen as not topmost

- Allow to move the splashscreen (no resize, or close, just move)

 

Thank you for your help

Martin Ivanov
Telerik team
 answered on 22 Apr 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?