Telerik Forums
UI for WPF Forum
1 answer
101 views

Hi,

I have a WPF application that uses a RadGridView placed inside a RadPane. The RadGridView contains data that has fixed groups on multiple columns (groups are defined in XAML). The ItemsSource of the RadGridView is bound to an ObservableCollection so the UI gets updated as new data becomes available.

The grouping and display of data works as expected. However, as soon as I rearrange the RadPanel that contains the RadGridView all groups are removed an I'm left with a flat list. How can I regroup or keep the groups in the RadGridView after moving the RadPanel?

I have attached a sample project that demonstrates this behavior:

  1. Build and start the attached application
  2. Hit the red start-button on the UI to start generating data.
  3. Now the generated data gets grouped as expected.
  4. Drag & Drop the panel with the GridView to another location.
  5. All groups now disappear.
Dilyan Traykov
Telerik team
 answered on 12 May 2022
1 answer
156 views

I would like help on how to change the Background of this Dialog


Thanks for the helpers

Stenly
Telerik team
 answered on 12 May 2022
0 answers
159 views

Hi, 

I'm having a problem with RadDesktopAlertManager. I call multiple times high frequency to ShowAlert and CloseAlert, and sometimes a gaps between two consecutive alerts is created.

David
Top achievements
Rank 1
 asked on 12 May 2022
0 answers
165 views

We have a WPF app with v2019.2.618.45 controls that has been working fine with the ArcGisMapProvider for a couple of years but has stopped displaying tiles in the last few days.

Have tried clearing MapCache (settings are .IsTileCachingEnabled = true; and .RequestCacheLevel = RequestCacheLevel.CacheIfAvailable;) but no difference.

That's with the release builds. Running in debug there's still an intermittent problem but more tiles load. Setting .IsTileCachingEnabled = false; in debug and all tiles seem to load correctly.

Anything that explains this behaviour or suggestions to debug? It will take some time to push a new release build and don't want to do this unnecessarily. We also don't want to lose the cached tiles.

Neil
Top achievements
Rank 1
 asked on 12 May 2022
1 answer
122 views

Hi,

We are building a template system using Telerik WPF Diagram.  This involves replacing template shape content with actual data from the DB. Based on the data, we have to move shapes around in relation to each other.   

Now, the issue is that for shapes that have width set to Auto, you can not get the shape dimensions before the shape  is rendered by the diagram, and there does not seem to be any event that indicates whether the diagram has done rendering all the items that have been added to it programmatically.  

Random Thread.sleep is problematic as you can imagine. Is there any solid mechanism available wherein one can know that the diagram has completed the rendering the final item that has been added to it?

We basically need a event/callback that will be triggered once the diagram has completed rendering of items. 

Martin Ivanov
Telerik team
 answered on 12 May 2022
1 answer
145 views

Hi,

Is there any way I can select (clicking on) relationships in a RadGanttView so I can remove the relation between two tasks? (whether it's with right click -> delete or with a RadRibbonButton)

Stenly
Telerik team
 answered on 12 May 2022
0 answers
225 views

I have used DateTimePicker with selectable date start and end, when binding the selected date with two way mode and entering the earlier date manually I am getting below error. Any idea?


<telerik:RadDateTimePicker x:Name="cmbDatePicker"
                            InputMode="DatePicker"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            Width="250" 
                            Height="30"
                            IsInputRestrictedToSelectableDates="True"
                            SelectableDateStart="{Binding SelectableDateStart}"
                            SelectableDateEnd="{Binding SelectableDateEnd}"
                            SelectedDate="{Binding ScheduledDate, Mode=TwoWay}"
                            />

 

Sathya
Top achievements
Rank 1
 updated question on 11 May 2022
0 answers
142 views

Hi

I have a GridView dinamically builded.  Columns are grouped and they can have an aggregate function. Some columns has different group but same aggregate function. 
I attached a screenshot.
There are 2 columns (min26 and min27), every column has AggregateMin as function. Caption of aggregatefunction is $"AggregateMin - {col.Header} - {col.ColumnGroupName} - ".
As you can see in the screenshot the two rows reports caption for every column.
I don't understand where is the problem.

This is the code that create the grid (it is quite complex but I think that is enough to understand the structure
		private void SetTableColumns(System.Collections.ObjectModel.ObservableCollection<RiassuntoElement> elementi
			, IEnumerable<LivelliSorgente> livelli = null)
		{
			RiassuntoSorgentiGrid.Columns.Clear();
			RiassuntoSorgentiGrid.ColumnGroups.Clear();
			if (elementi.Count() > 0)
			{
				GridViewDataColumn col;
				RiassuntoSorgentiGrid.ColumnGroups.Add(new GridViewColumnGroup()
				{
					Header = "",
					Name = GROUPNAME,
				});
				col = new GridViewDataColumn()
				{
					Header = Utility.LoadString(ResourcesKeys.SorgenteColumnHeader),
					ColumnGroupName = GROUPNAME,
					DataMemberBinding = new Binding("Sorgente.Name")
					{
						Mode = BindingMode.OneWay
					}
				};
				col.Footer = Utility.LoadString(ResourcesKeys.AggregatiHeader);
				col.FooterTextAlignment = TextAlignment.Center;
				RiassuntoSorgentiGrid.Columns.Add(col);
				RiassuntoSorgentiGrid.ColumnGroups.Add(new GridViewColumnGroup()
				{
					Header = Utility.LoadString(ResourcesKeys.GeneralTabHeader),
					Name = GENERALGROUPNAME,
				});
				if (LivelliRichiesti.Contains(LivelliSorgente.Durata))
				{
					col = new GridViewDataColumn()
					{
						Header = Utility.LoadString(ResourcesKeys.DurataComplessiva),
						ColumnGroupName = GENERALGROUPNAME,
						DataMemberBinding = new Binding("Sorgente.DurataComplessiva")
						{
							Mode = BindingMode.OneWay,
							Converter = new TimeSpanToStringOver24()
						}
					};
					SetAggregateFunction(LivelliSorgente.Durata, col);
					RiassuntoSorgentiGrid.Columns.Add(col);
				}

				RiassuntoSorgentiGrid.Columns.Add(new GridViewDataColumn()
				{
					Header = Utility.LoadString(ResourcesKeys.StartLabel),
					ColumnGroupName = GENERALGROUPNAME,
					IsSortable = true,
					DataFormatString = Application.Current.FindResource(ResourcesKeys.StringFormatTime).ToString(),
					DataMemberBinding = new Binding("Sorgente.IstanteIniziale")
					{
						Mode = BindingMode.OneWay
					}
				});

				RiassuntoSorgentiGrid.Columns.Add(new GridViewDataColumn()
				{
					Header = Utility.LoadString(ResourcesKeys.EndLabel),
					ColumnGroupName = GENERALGROUPNAME,
					DataFormatString = Application.Current.FindResource(ResourcesKeys.StringFormatTime).ToString(),
					DataMemberBinding = new Binding("Sorgente.IstanteFinale")
					{
						Mode = BindingMode.OneWay
					}
				});

				if (LivelliRichiesti.Contains(LivelliSorgente.Ripetizioni))
				{ 
					RiassuntoSorgentiGrid.Columns.Add(new GridViewDataColumn()
					{
						Header = Utility.LoadString(ResourcesKeys.RipetizioniSorgente),
						ColumnGroupName = GENERALGROUPNAME,
						DataFormatString = "D",
						DataMemberBinding = new Binding("Sorgente.Ripetizioni")
						{
							Mode = BindingMode.OneWay
						}
					});
				}
				for (int i = 0; i < elementi.First().Parametri.Count; i++)
				{
					SetSorgenteColumns(elementi, i, livelli);
				}
			}
		}

		int _numCol = 0;
		private void SetSorgenteColumns(System.Collections.ObjectModel.ObservableCollection<RiassuntoElement> elementi
			, int i, IEnumerable<LivelliSorgente> livelli)
		{
			try
			{

				if (livelli == null)
					livelli = LivelliRichiesti;
				var parametro = elementi.First().Parametri[i];
				string groupName = "Group" + parametro.Id;
				var group = new GridViewColumnGroup()
				{
					Header = parametro.Name,
					Name = groupName,
				};

				RiassuntoSorgentiGrid.ColumnGroups.Add(group); 
			
				foreach (var l in livelli)
				{
					if (l == LivelliSorgente.Durata || l == LivelliSorgente.Ripetizioni)
						continue;
					var attributes = l.GetType().GetMember(l.ToString())[0].GetCustomAttributes(typeof(TypeLivelliSorgenteAttribute), false);
					if (attributes.Length > 0 && attributes[0] is TypeLivelliSorgenteAttribute typeLivello)
					{
						var col = new GridViewDataColumn()
						{
							Name = l.ToString() + _numCol,
							Header = l.ToString() + _numCol++,
							ColumnGroupName = groupName,
							DataFormatString = typeLivello.TypeLivello switch
							{
								TypeLivelliSorgente.Date => Application.Current.FindResource(ResourcesKeys.StringFormatTime).ToString(),
								TypeLivelliSorgente.Double => "F1",
								TypeLivelliSorgente.Int => "D",
								TypeLivelliSorgente.TimeSpan => "",
								_ => "F1"
							},
							DataMemberBinding = new Binding($"Sorgente.LivelliSingoli[{parametro.Id}][{l}]")
							{
								Mode = BindingMode.OneWay,
								FallbackValue = "0",
								TargetNullValue = "0",
								Converter = (typeLivello.TypeLivello == TypeLivelliSorgente.TimeSpan)
									? new TimeSpanToStringOver24()
									: null
							}
						};
						SetAggregateFunction(l, col);
						
						RiassuntoSorgentiGrid.Columns.Add(col);
					}
				}
			}
			catch (Exception ex)
			{
				throw;
			}
		}

		private void SetAggregateFunction(LivelliSorgente l, GridViewDataColumn col)
		{
			col.AggregateFunctions.Clear();
			switch (l)
			{
				case LivelliSorgente.Leq:
					col.AggregateFunctions.Add(new AggregateLeqFunction()
					{
						Caption = $"AggregateLeq - {col.Header} - {col.ColumnGroupName} - ",
						FunctionName = "AggregateLeq",
						ResultFormatString = "{0:F1}",						
					});
					break;
				case LivelliSorgente.Max:
					col.AggregateFunctions.Add(new AggregateMaxFunction()
					{
						Caption = string.Empty,
						FunctionName = "AggregateMax",
						ResultFormatString = "{0:F1}"
					});
					break;
				case LivelliSorgente.TimeMax:
					col.AggregateFunctions.Add(new AggregateTimeMaxFunction
					{
						Caption = string.Empty,
						FunctionName = "AggregateTimeMax",
					});
					break;
				case LivelliSorgente.Min:
					col.AggregateFunctions.Add(new AggregateMinFunction()
					{
						Caption = $"AggregateMin - {col.Header} - {col.ColumnGroupName} - ",
						FunctionName = "AggregateMin",
						ResultFormatString = "{0:F1}"
					});
					break;
				case LivelliSorgente.TimeMin:
					col.AggregateFunctions.Add(new AggregateTimeMinFunction
					{
						Caption = string.Empty,
						FunctionName = "AggregateTimeMin",
					}) ;
					break;
				case LivelliSorgente.Ripetizioni:
					break;
				case LivelliSorgente.Durata:
					col.AggregateFunctions.Add(new AggregateDurataFunction()
					{
						Caption = string.Empty,
						FunctionName = "AggregateDurata"
					});
					break;
				case LivelliSorgente.Sel:
					break;
				case LivelliSorgente.LeqSpalmato:
					break;
				default:
					break;
			}
			col.FooterTextAlignment = TextAlignment.Center;
		}
Thank you
Luigi
Luigi
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 11 May 2022
1 answer
458 views

Hi,

My problem it's about Telerik.Windows.Controls.RichTextBoxUI. I'm on the process of upgrading a .NetFramework project to NET6, i've download the demo dlls for .NET6 and i'm setting up a Implicit Style, i've done everything this Link said, i've changed my Telerik UIs References to the NoXaml ones, i've merged the Xaml files and i've put the Office2019 themes on the project.

Now the problem is that RichTextBoxUI.xaml it's failing when compiling because can't find isStringNotEmptyToBoolConverter, and when i open the file, it's full of errors, saying it can find the assembly for Telerik.Windows.Controls.RichTextBoxUI. I'm guessing it's due to a missing DLL, but in \Binaries.NoXaml\WPF60 there's no dll for RichTextBoxUI, only RichTextBox.

Telerik.Windows.Documents.Xaml it's also failing and it's almost the same, failing references to other Documents. references that are not in the \Binaries.NoXaml\WPF60 folder.

It's there a place where i can find these dll? are they diferent for NET6 and i'm making a mistake with the setting of the Themes?

Thanks in advance.

Tanya
Telerik team
 answered on 11 May 2022
1 answer
238 views

Anchor tag with not text is by default not shown in HTML document. Such anchor tags are used for internal purpose.

<a href="/EORWeb/Download?/6971042495152-I.D card.pdf" target="_blank"/>

Importing Html document in Rad rich text box is working as expected, but if same document is converted to RTF first by using RtfFormatProvider or save html imported document as rtf; you will notice such anchor tags are visible in Richtextbox editor.

This behavior make consumer annoying, as he/she is expecting same behavior in standard html document. I checked import/export settings for both RtfFormatProvider and HtmlFormateProvider to stop such anchor tags.

For reference I am attaching sample html document, which contains such anchor tags, but supposed not to be appear in editor. and following RadRichtextbox behvior.

 

Correct behavior when importing html document

 

RFT document behavior. (Highlighted anchors need to be hidden)

 

Tanya
Telerik team
 answered on 11 May 2022
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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?