Telerik Forums
UI for WPF Forum
0 answers
185 views

Hi,

I was not able to find this answer on the forum. It looks like a simple thing to do but I was not able to understand it.

I have three RadTreeView with the following xaml options: (IsDragDropEnabled="True" AllowDrop="True" telerik:ScrollingSettingsBehavior.IsEnabled="False" IsDragTooltipEnabled="False") . All three Trees have 2 level of data of 2 different type of objects. 

The drop of an item might be allowed or not, depending on a combination on:

  • the origin tree of the Drag (tree 1, 2 or 3)
  • the type of object selected (level 1 or level 2)
  • the target tree (tree 1,2 or 3)
  • the drop position (inside, after, before)

As an example, the level 2 objects of tree 1 cannot be dropped on tree 3, while on tree 2 the can only be dropped inside the level 1, or before/after the level 2 (not inside level 2).

I implemented all the controls to allow this behaviour in the handler of "DragDropManager.AddDropHandler", in which when the drop is not allowed I simply have that the DropAction = DropAction.None and everything is working fine.

However what I would like to have is that when the drop is not supposed to be allowed, the drop preview should not be visible. by drop preview I mean the line in between items when the drop position is after/before or the highlight of the target item when the drop position is inside. Note that I still would like to keep the drag preview of the source item,  and that I disabled the dragtooltip as not of interest.

I considered using the handler "DragDropManager.AddDragInitializeHandler" to set the AllowDrop to false for all the correct items, however sometimes (like in the example above) I want to disable the drop only for certain drop positions, thus the item AllowDrop property cannot be set to false at the beginning of the drag. 

What I think I should do is to use the handler "DragDropManager.AddDragOverHandler", in which I check if the drop is feasible. If it is not, I somehow disable the drop preview, if it is allowed, i enable it once again. This is where I'm stuck.

Considering the variable var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key) as TreeViewDragDropOptions;

If after checking that the drop is not allowed I set options.DropTargetItem.AllowDrop = false, the visual result is exactly what I need. However, from that moment on the handler "DragDropManager.AddDragOverHandler" does not fire anymore on that Item, so I cannot set it again to true.

If instead I set options.DropTargetItem.IsDropAllowed = false; nothing happens.

I tried to play with the dragvisual property, setting as an example the  dragVisual.IsDropPossible = false, but it doesn't change the result (I guess that this property is only for the dragtooltip that I disabled)

Note that, if possible, I also do not want to override the drop position from the not allowed to the allowed one, like suggested in the documentation (https://docs.telerik.com/devtools/wpf/controls/radtreeview/how-to/drag-and-drop/enabled-drop-inside-only). 

           

Could you please suggest me how to proceed? Please let me know if you need more information.

Thanks in advance for your help.

 

 

Antonino
Top achievements
Rank 1
Iron
 asked on 03 May 2023
1 answer
137 views
How can I, for example, when clicking on a specific button, make its event open or display me a window or page in a new tab item dynamically, and all I have to do is select the page or window to display and it moves me to it and opens it inside a new tab item just like the Google Chrome browser
Stenly
Telerik team
 answered on 03 May 2023
1 answer
176 views

Hello,

We have performance issues on a WPF application. We did some analysis using dotTrace (attached screenshot) where we saw that the method Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size) is causing quite some delay. 

Are there any ways to get this more up to speed ?

Thanks !

Martin Ivanov
Telerik team
 answered on 03 May 2023
0 answers
161 views

Hi Telerik Team,

We are using RadMaskedCurrencyInput inside RadGridView as RowDetailTemplate. But the performance is very poor, as it takes nearly 100 milliseconds for each number typing.

Also, it takes 2 to 4 seconds when we perform Select All and typing the number.

This happens only if the control is placed inside the RadGridView.

We have the same control outside the RadGridView for testing purpose which performs good.

Please let me know if any optimization can be done with this.

Below are the code we are using.

<tk:RadMaskedCurrencyInput

                    maskedInput:MaskedInputExtensions.MaxTextLength="5"

                    maskedInput:MaskedInputExtensions.Minimum="0"

                    FontSize="12"

                    FontWeight="DemiBold"

                    IsCurrencySymbolVisible="False"

                    Mask=""

                    SpinMode="None"

                    TextMode="PlainText" />

 

I'm not able to attach the video file here.
Thank You.

Premkumar
Top achievements
Rank 1
Iron
Iron
 asked on 02 May 2023
0 answers
443 views

Hello, I have an issue with one column in the RadGridView.

I managed to bind a column to a value in the dictionary of my GridViewRow's DataContext.

Altought the filter icon appears, inside the list in the filter control I see only 1 item with the value "null", instead of the string values.

In the column itself, I can see all the values as expected.
I tried to set the DataMemberType/FilterMemberType to System.String, FilterMemberPath, add a converter that returns the string, and many other things that didn't work.

How can I filter this property?

The RadGridViewDataColumn is bound to a dictionary value on the DataMemberBinding property:
DataMemberBinding="{Binding MyDictionary[MyEnum.FirstValue].Title}"

Please see the "MyDemoProject.zip" example in the comments.

** Also sorting is not working. The sorting clears the RadGridRows, I think that it happens because of the same issue.

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 01 May 2023
1 answer
173 views

Hi

I have a model class that it is in the form

Class A
{
	public List<B> B {get;set;}
	public List<C> C {get;set;}
}

And I would build a treeview with a list of A: A1, A2 in this way:


A1
	Objects of type B
		B1
		B2
	Objects of type C
		C1
		C2
A2
	Objects of type B
		B3
		B4
	Objects of type C
		C3
		C4

But the second level is missing in the model class (we can see it as a "virtual level"). Is there a way to add the level directly in xaml (the number and the tags of the elements are fixed by design).

Thank you

Luigi

Petar Mladenov
Telerik team
 answered on 01 May 2023
0 answers
226 views

Hi

I use DragDropManager inside a RadGridView. When a user drags a row over another row I want to perform an action. I setup the DragOver event with:

DragDropManager.AddDragOverHandler(row, OnRowDragOver);

This works most of the time. However if a user moves the mouse in a fast movement over the row the event is not fired.

Is there some property (maybe updateTime or throtteTime) I can lower to ensure the event is always fired?

Daniel
Top achievements
Rank 1
 asked on 27 Apr 2023
1 answer
222 views

Hello.

I want to show in my pie chart only values not percentage.  How I can do this?

<telerik:RadPieChart
     x:Name="chart"
     Palette="Windows8"
     HoverMode="FadeOtherItems"
     HorizontalAlignment="Stretch"
     Foreground="{StaticResource KolorCzcionki1}"
     FontSize="{StaticResource HeaderFontSize}"                            
     VerticalAlignment="Stretch">
         <telerik:PieSeries ItemsSource="{Binding Raport, UpdateSourceTrigger=PropertyChanged}"
              ShowLabels="True"                                               
              ValueBinding="Ilosc"
              DisplayName="Name">
                  <telerik:PieSeries.LegendSettings>
                      <telerik:DataPointLegendSettings TitleBinding="Name"/>
                  </telerik:PieSeries.LegendSettings>
           </telerik:PieSeries>          
</telerik:RadPieChart>


Martin Ivanov
Telerik team
 answered on 27 Apr 2023
0 answers
179 views

Hi, I have a strange issue with your combo box.

I created a behavior that syncronize between the RadComboBox selected items to the ObservableCollection in thr view model.

I have two different xaml with one RadComboBox in each xaml and one ObservableCollection in each xaml (different collections).

The behavior was fully tested and works with WPF ListBox. When I use it with the RadComboBox I face a strange issue. Sometimes after data context is changed very fast (for example rows in GridView) the behavior stop synchronizing properly and some items are removed from the source collection.

Some inputs:

1. This is happening only with the RadComboBox

2. I tried your behavior from other forum question, but your behavior gets exception during update of the source collection (during the iteration of the target collection it says the it was changed).

I think that somehow you are changing the selected items collection of the RadGridView, so I am getting exceptions or executing additional collection changed events.

Questions:

1. Did you face something similar?

2. I couldn't reproduce in other application because my application is complex. Can you check your RadComboBox code and check if you are initializing the SelectedItems many times / updating the binding?

My window is always visible and the RadComboBox should not be initialized many times. I think that you initialize the SelectedItems collection many times in the CustomControl code.

 

 

alex
Top achievements
Rank 2
Bronze
Iron
Iron
 updated question on 27 Apr 2023
1 answer
572 views

Urgent and immediate assistance is requested to identify which of the .DLLs list below are impacted CVE vulnerability CVE-2021-28141, CVE-2020-13661, CVE-2020-11414, CVE-2019-19790, CVE-2019-18935, CVE-2018-15122, CVE-2017-11357, CVE-2017-11317, and CVE-2017-9248.

 

Telerik.Pivot.Core.dll,411048,5/17/2018,10:42:24 AM

Telerik.Pivot.DataProviders.Adomd.dll,45992,5/17/2018,10:42:32 AM

Telerik.Pivot.DataProviders.Queryable.dll,94632,5/17/2018,10:42:30 AM

Telerik.Pivot.DataProviders.Xmla.dll,65448,5/17/2018,10:42:32 AM

Telerik.Windows.Analytics.dll,14248,5/17/2018,10:46:26 AM

Telerik.Windows.Cloud.Controls.dll,45480,5/17/2018,10:42:36 AM

Telerik.Windows.Cloud.dll,11688,5/17/2018,10:42:34 AM

Telerik.Windows.Controls.Chart.Direct2D.dll,36776,5/17/2018,10:41:00 AM

Telerik.Windows.Controls.Chart.dll,1583016,5/17/2018,10:41:00 AM

Telerik.Windows.Controls.Data.dll,352168,5/17/2018,10:40:48 AM

Telerik.Windows.Controls.DataServices.dll,48040,5/17/2018,10:40:50 AM

Telerik.Windows.Controls.DataServices50.dll,48040,5/17/2018,10:46:28 AM

Telerik.Windows.Controls.DataServices60.dll,48040,5/17/2018,10:46:28 AM

Telerik.Windows.Controls.DataVisualization.dll,2282920,5/17/2018,10:41:12 AM

Telerik.Windows.Controls.Diagrams.dll,449448,5/17/2018,10:41:20 AM

Telerik.Windows.Controls.Diagrams.Extensions.dll,264104,5/17/2018,10:41:24 AM

Telerik.Windows.Controls.dll,3768744,5/17/2018,10:40:22 AM

Telerik.Windows.Controls.Docking.dll,242600,5/17/2018,10:40:54 AM

Telerik.Windows.Controls.EntityFramework.dll,24488,5/17/2018,10:40:52 AM

Telerik.Windows.Controls.EntityFramework60.dll,24488,5/17/2018,10:46:30 AM

Telerik.Windows.Controls.Expressions.dll,57768,5/17/2018,10:42:18 AM

Telerik.Windows.Controls.FixedDocumentViewers.dll,420776,5/17/2018,10:40:34 AM

Telerik.Windows.Controls.FixedDocumentViewersUI.dll,43944,5/17/2018,10:40:38 AM

Telerik.Windows.Controls.GanttView.dll,200104,5/17/2018,10:41:30 AM

Telerik.Windows.Controls.GridView.dll,1086888,5/17/2018,10:40:44 AM

Telerik.Windows.Controls.ImageEditor.dll,296872,5/17/2018,10:41:32 AM

Telerik.Windows.Controls.Input.dll,608168,5/17/2018,10:40:28 AM

Telerik.Windows.Controls.Navigation.dll,1156008,5/17/2018,10:40:32 AM

Telerik.Windows.Controls.Pivot.dll,197032,5/17/2018,10:42:24 AM

Telerik.Windows.Controls.PivotFieldList.dll,263080,5/17/2018,10:42:28 AM

Telerik.Windows.Controls.RibbonView.dll,458664,5/17/2018,10:41:16 AM

Telerik.Windows.Controls.RichTextBoxUI.dll,2193832,5/17/2018,10:41:56 AM

Telerik.Windows.Controls.ScheduleView.dll,617384,5/17/2018,10:41:28 AM

Telerik.Windows.Controls.Spreadsheet.dll,2603944,5/17/2018,10:42:16 AM

Telerik.Windows.Controls.VirtualGrid.dll,111528,5/17/2018,10:40:46 AM

Telerik.Windows.Data.dll,475048,5/17/2018,10:40:24 AM

Telerik.Windows.Diagrams.Core.dll,597928,5/17/2018,10:41:18 AM

Telerik.Windows.Documents.Core.dll,366504,5/17/2018,10:39:46 AM

Telerik.Windows.Documents.dll,2858920,5/17/2018,10:41:44 AM

Telerik.Windows.Documents.Fixed.dll,2465192,5/17/2018,10:39:52 AM

Telerik.Windows.Documents.Flow.dll,1805736,5/17/2018,10:39:58 AM

Telerik.Windows.Documents.Flow.FormatProviders.Pdf.dll,48552,5/17/2018,10:40:00 AM

Telerik.Windows.Documents.FormatProviders.Html.dll,305064,5/17/2018,10:41:46 AM

Telerik.Windows.Documents.FormatProviders.MsRichTextBoxXaml.dll,23976,5/17/2018,10:42:00 AM

Telerik.Windows.Documents.FormatProviders.OpenXml.dll,246184,5/17/2018,10:41:46 AM

Telerik.Windows.Documents.FormatProviders.Pdf.dll,1583528,5/17/2018,10:41:48 AM

Telerik.Windows.Documents.FormatProviders.Rtf.dll,250792,5/17/2018,10:42:00 AM

Telerik.Windows.Documents.FormatProviders.Xaml.dll,37800,5/17/2018,10:41:48 AM

Telerik.Windows.Documents.Proofing.DataGrid.dll,19368,5/17/2018,10:42:06 AM

Telerik.Windows.Documents.Proofing.Dictionaries.En-US.dll,3259304,5/17/2018,10:41:58 AM

Telerik.Windows.Documents.Proofing.dll,69544,5/17/2018,10:42:02 AM

Telerik.Windows.Documents.Proofing.RadGridView.dll,17832,5/17/2018,10:42:06 AM

Telerik.Windows.Documents.Spreadsheet.dll,1785768,5/17/2018,10:40:04 AM

Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll,345000,5/17/2018,10:40:06 AM

Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.dll,37800,5/17/2018,10:40:08 AM

Telerik.Windows.PersistenceFramework.dll,78248,5/17/2018,10:42:20 AM

Telerik.Windows.Scheduling.Core.dll,265128,5/17/2018,10:41:30 AM

Telerik.Windows.Themes.Expression_Dark.dll,2120104,5/17/2018,10:46:50 AM

Telerik.Windows.Themes.Green.dll,1830312,5/17/2018,10:46:58 AM

Telerik.Windows.Themes.Material.dll,2063272,5/17/2018,10:47:08 AM

Telerik.Windows.Themes.Office2013.dll,2015144,5/17/2018,10:47:18 AM

Telerik.Windows.Themes.Office2016.dll,2002344,5/17/2018,10:47:34 AM

Telerik.Windows.Themes.Office2016Touch.dll,1986472,5/17/2018,10:47:26 AM

Telerik.Windows.Themes.Office_Black.dll,2184616,5/17/2018,10:47:44 AM

Telerik.Windows.Themes.Office_Blue.dll,2186664,5/17/2018,10:47:54 AM

Telerik.Windows.Themes.Office_Silver.dll,2182568,5/17/2018,10:48:04 AM

Telerik.Windows.Themes.Summer.dll,2178472,5/17/2018,10:48:16 AM

Telerik.Windows.Themes.Transparent.dll,2186152,5/17/2018,10:48:26 AM

Telerik.Windows.Themes.Vista.dll,2180008,5/17/2018,10:48:38 AM

Telerik.Windows.Themes.VisualStudio2013.dll,2117032,5/17/2018,10:48:48 AM

Telerik.Windows.Themes.Windows7.dll,2219944,5/17/2018,10:48:58 AM

Telerik.Windows.Themes.Windows8.dll,1917352,5/17/2018,10:49:18 AM

Telerik.Windows.Themes.Windows8Touch.dll,1914280,5/17/2018,10:49:08 AM

Telerik.Windows.Zip.dll,150952,5/17/2018,10:39:42 AM

Telerik.Windows.Zip.Extensions.dll,17832,5/17/2018,10:39:42 AM

Telerik.Windows.Controls.resources.dll,391312,12/13/2022,12:11:52 PM

Telerik.Windows.Controls.resources.dll,403600,12/13/2022,12:11:56 PM

Telerik.Windows.Controls.resources.dll,365712,12/13/2022,12:12:14 PM

Telerik.Windows.Controls.resources.dll,376976,12/13/2022,12:12:16 PM

Telerik.Windows.Controls.resources.dll,394896,12/13/2022,12:12:18 PM

Telerik.Windows.Controls.resources.dll,378000,12/13/2022,12:12:20 PM

Telerik.Windows.Controls.resources.dll,405136,12/13/2022,12:12:22 PM

Telerik.Windows.Controls.resources.dll,399504,12/13/2022,12:12:26 PM

Telerik.Windows.Controls.resources.dll,386704,12/13/2022,12:12:28 PM

Telerik.Windows.Controls.resources.dll,403088,12/13/2022,12:12:32 PM

Telerik.Windows.Controls.resources.dll,385680,12/13/2022,12:12:34 PM

Telerik.Windows.Controls.resources.dll,486032,12/13/2022,12:12:36 PM

Telerik.Windows.Controls.resources.dll,386704,12/13/2022,12:12:40 PM

Telerik.Windows.Controls.resources.dll,397968,12/13/2022,12:12:42 PM

Telerik.Windows.Controls.resources.dll,373904,12/13/2022,12:12:44 PM

Telerik.Windows.Controls.resources.dll,374928,12/13/2022,12:12:48 PM

Telerik.bat,272,4/20/2023,5:34:27 PM

Telerik.txt,34,4/20/2023,5:34:27 PM
Martin Ivanov
Telerik team
 answered on 25 Apr 2023
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
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?