Telerik Forums
UI for WPF Forum
0 answers
114 views
I am using RadGridView's ExportToXlsx. I have been able to provide some styling (background colors and cell borders) in the ElementExportingToDocument event.  But I don't see a way to increase the row height and column width.  Is there a way to do this?
Carol
Top achievements
Rank 1
 asked on 04 May 2022
1 answer
87 views

I have a property called FolderName which is bound in storage view.xaml. I set this value with folder dialog. However if I call that value from within storage view or another view.cs its always defaulted. How do I persist the values across the running app. In code base I had to hardcover value.

https://github.com/CrownParkComputing/MegaDownloaderFinal

Petar Mladenov
Telerik team
 answered on 03 May 2022
1 answer
117 views
Still working on my DAX custom language editor. Color tagging and Intelliprompts are working, have moved on to overloads. By default, the overloads seem to display below the cursor which conflicts with the intelliprompts (overlaps). Can I move the overloads to display above the cursor instead and how?
Stenly
Telerik team
 answered on 02 May 2022
0 answers
108 views

Hi
I need to represent a list of columns  whose number is multiplied for the cardinality of a list of other elements.
For istance I have a list of "Sources": [S1, S2], and for every sources I have a fixed number of values [V1, V2, V3].
The columns table wil be:
S1                   | S2

V1 | V2 |V3    | V1 | V2 V3

I achieved that with the following code:
 

		private void SetTableColumns(ObservableCollection<StatisticaTableViewPerClasse> elementi
			, IEnumerable<string> sorgentiNames
			, string columnClassHeader)
		{
			GridAnalisiStatisticaTable.Columns.Clear();
			GridAnalisiStatisticaTable.ColumnGroups.Clear();
			if (elementi.Count() > 0)
			{
				//var sorgenti = elementi.GroupBy(e => e.Sorgente.Id,
				//				e => e.Sorgente.Name,
				//				(id, name) => name).Select(s => s.FirstOrDefault());
				foreach (var sorgenteName in sorgentiNames)
				{
					var groupName = GROUPNAME + sorgenteName;
					var group = new GridViewColumnGroup()
					{
						Header = sorgenteName,
						Name = groupName,
						
					};
					GridAnalisiStatisticaTable.ColumnGroups.Add(group); 
					//GridAnalisiStatisticaTable.Columns.Add(new GridViewDataColumn()
					//{
					//	Header = Utility.LoadString(ResourcesKeys.SorgenteColumnHeader),
					//	DataMemberBinding = new Binding("Sorgente.Name"),
					//	ColumnGroupName = groupName
					//});
					GridAnalisiStatisticaTable.Columns.Add(new GridViewDataColumn()
					{
						Header = columnClassHeader,
						DataMemberBinding = new Binding("ClasseHeader"),
						ColumnGroupName = groupName
					});
					GridAnalisiStatisticaTable.Columns.Add(new GridViewDataColumn()
					{
						Header = Utility.LoadString(ResourcesKeys.DistribuzioneProbabilitàHeader),
						DataMemberBinding = new Binding($"Values[{sorgenteName}].DistribuzioneValue")
						{
							StringFormat = "N2"
						},
						ColumnGroupName = groupName
					});
					GridAnalisiStatisticaTable.Columns.Add(new GridViewDataColumn()
					{
						Header = Utility.LoadString(ResourcesKeys.ProbabilitàCumulativaHeader),
						DataMemberBinding = new Binding($"Values[{sorgenteName}].CumulativaValue")
						{
							StringFormat = "N2"
						},
						ColumnGroupName = groupName
					});
				}
			}
		}
Where the GridView is defined as:

<t:RadGridView x:Name="GridAnalisiStatisticaTable" Grid.Row="1"
					   RowIndicatorVisibility="Collapsed"
					   AutoGenerateColumns="False"
						GroupRenderMode="Flat"
					   ShowGroupPanel="False"
						IsPropertyChangedAggregationEnabled="False"
					   ItemsSource="{Binding Statistiche}"/>
And the listed class is:


public class StatisticaTableView
	{
		public StatisticaTableView(KeyValuePair<decimal, double> entry, StatisticType type)
		{
			switch (type)
			{
				case StatisticType.DistribuzioneProbabilità:
					DistribuzioneValue = entry.Value;
					break;
				case StatisticType.ProbabilitàCumulativa:
					CumulativaValue = entry.Value;
					break;
				case StatisticType.LivelliPercentili:
					break;
				case StatisticType.DistribuzioneTemporale:
					break;
				default:
					break;
			}
		}
		public double DistribuzioneValue { get; set; }
		public double CumulativaValue { get; set; }
	}
	public class StatisticaTableViewPerClasse
	{
		public StatisticaTableViewPerClasse(KeyValuePair<decimal, double> entry, decimal classRange, StatisticType type, string sorgenteName)
		{
			Classe = entry.Key;
			ClasseHeader = $"{entry.Key} - {entry.Key + classRange}";
			Values.Add(sorgenteName, new(entry, type));
		}
		public decimal Classe { get; set; }
		public string ClasseHeader { get; set; }
		public Dictionary<string, StatisticaTableView> Values { get; set; } = new();
	}

But the resulting grid (formally correct) has very poor performance, when I scroll the rows, though the rows number is only 30.

I think that the problem comes from the binding with index (DataMemberBinding = new Binding($"Values[{sorgenteName}].DistribuzioneValue")), is there a way to achieve the same result with better  performance?
Thank you
Luigi
Luigi
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 02 May 2022
1 answer
146 views

Hi,

I am using RadNavigationViewControl with RadDocking inside in the mainWindow, main view.

like this:

<RadNavigationView>

   <RadNavigationView.Content>

     <RadDocking>

               <RadDocking.DocumentHost>

                              <RadPaneGroup Name=mainPaneGroup/>

               </RadDocking.DocumentHost>

     </RadDocking>

   </RadNavigationView.Content>

</RadNavigationView>

 

When I open the new menu, new RadPane is Created inside RadPaneGroup, and I want it to be isFloatable and isDockable.

But the problem is that when I unload radpane, the radpane unloaded is not "Dockable" to any of control.

When I remove RadNavigationView and put RadDocking independently, RadDocking itself and contents inside work fine.

Is there a way to implement RadDocking inside RadNavigationView Content?

 

 

Petar Mladenov
Telerik team
 answered on 02 May 2022
1 answer
96 views

Hi Telerik Team,

I looked at the example below and tried the same,

but it came out like the attached picture

https://docs.telerik.com/devtools/wpf/controls/raddiagram/extensions/settingspane/settingspaneview_properties

I want know if it is possible to change the width of  SettingsPaneView.

regards,

Dooly
Top achievements
Rank 1
Iron
 answered on 28 Apr 2022
0 answers
647 views

The scroll bars are placed in the tables

PROBLEM

When you have a WPF RadGridView based on Table of many columns, consequently the Horizontal Scrollbar appear in Last row's as shown below. As the user scrolls to the bottom, it is look like the last row is not fully visible, its content has been cut.

Note : Theme Setting Mechanisms

QUESTION : How can show Horizontal scrollbar correctly like : 

CAUSE & SOLUTION plz?

Asem
Top achievements
Rank 1
 updated question on 27 Apr 2022
0 answers
172 views

Codebase  available here : https://github.com/CrownParkComputing/MegaDownloaderFinal

so using the FolderDialog example for wpf, The binding for the propertt FolderName does not update after selecting a new folder. The original assignment works fine?

Errors shown  :

FolderName property not found on object of type String.

IsSearchActive property not found on object of type OpenFolderDialogViewModel.

ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type RadWatermarkTextBox

Please help with these issues I am stumped. 

 

Jonathan
Top achievements
Rank 1
Iron
 asked on 26 Apr 2022
1 answer
136 views

Is there a quicker way of selecting / deselecting groups of children items in RadTreeListView ??


if (e.AddedItems.Count > 0)
            {
                foreach (NodesModel i in e.AddedItems)
                {
                    if (i.Name != "WHDLoad")
                    {
                        if (i.Items.Count > 0)
                        {
                            foreach (NodesModel x in i.Items)
                            {
                                {
                                    //x.IsSelected = true;
                                    Nodes.SelectedItems.Add(x);
                                }
                            }
                        }
                    }
                }
            }

Jonathan
Top achievements
Rank 1
Iron
 answered on 26 Apr 2022
1 answer
177 views

Hi Telerik Team,

I create some custom columns and observed some strange behavior. Many columns use the same custom column with different values (bindings) but sometimes show the same values, especially when scrolling. So I use the CustomColumn example to investigate further.

I can reproduce this 100%. Column2 switches to the binding from Column1. I attached a sample project + video.

I can "solve" this problem by setting the Binding every time the CreateCellElement method is called. BUT this happends every time a value changed and it is used for a stock exchange software, were values changing a lot so I believe it can be a performance issue.

if (bar == null)
{
    bar = new RadProgressBar();
    bar.Height = 20;
    cell.Content = bar;
}

bar.SetBinding(RadProgressBar.ValueProperty, this.DataMemberBinding);

Is this a bug? Do I understand this wrong? Why is the cell "created" on every value change?

PS: the real grid has about 100 columns and the CustomColumns had multiple Bindings also to DependencyProperties wich had to be constructed every time.

regards,
marco

Martin Ivanov
Telerik team
 answered on 26 Apr 2022
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?