Telerik Forums
UI for WinForms Forum
1 answer
335 views

I am following the following documentation for the RadTreeView on populating a Treeview through an XML Datasource.

However, The documentation doesn't really get in depth about how the XML schema and naming conventions correlates to the RadTreeview control itself or how the corresponding XML elements are being linked up.

The ID and parentID elements are obvious enough and those do appear to be referenced in the initialization of the RadTreeview control through the following code.

 

this.radTreeView1.ChildMember = "id";
this.radTreeView1.ParentMember = "parentId";

 

However, the XML "Title" element maps to the RadTreeView.DataMember property, which is not as obvious.

A RadTreeNode seems to have 4 different properties available to populate (Name, Tag, Text, Value). Again based on documentation I am not sure what the difference is in each of these values.

When populating the RadTreeView through XML Datasource, and then iterating through each of the nodes, it seems as though (Name, Text, and Value) are all populated with the XML value from the "Title" element, and that the RadTreeNode (Tag) value is left blank.

Can someone elaborate on the difference between (Name, Tag, Text, and Value) and what specific purpose each is intended to serve?

Can someone also elaborate on how the XML elements are being mapped?

Additionally can the XML schema be modified to populate these values? I am particularly interested in populating the (Tag) property, but would like to understand what else is possible with XML.

Right now I can iterate through the RadTreeView nodes after its loaded and manually set the Tag value, but this kind of defeats the purpose of using something like XML in the first place.

Any help much appreciated!

Dimitar
Telerik team
 answered on 22 Jan 2021
1 answer
295 views
Is there a way that you can order by the selected items in the CheckedList box?  So that when the dropdown list opens all the checked items are at the top.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Jan 2021
6 answers
335 views

I am not able to set the weekday format in Scheduler for month view. I am using the control in a very small area, and I need to set the weekday names to be abbreviated (Mon, Tue, Wed, etc.).

I have set the HeaderFormat property on both the GetMonthView() and the scheduler control, and it does not seem to change. I still see the weekday names fully spelled out, and Wednesday will not fit into the allocated area.

Fahmi
Top achievements
Rank 1
Veteran
 answered on 21 Jan 2021
9 answers
373 views

About the PropertyGrid in one of the SPINNER type inputs, we need this behavior, please help us:


1. We need to not be allowed to enter a number with the keyboard. Only allow increase / decrease using the Spinner arrows.  It's possible ?.

2. By increasing or decreasing with the arrows, certain code is executed immediately. Since we tried it through the PropertyValueChanged () event, but it is executed when the Spinner loses focus.

        private void rpgHcPropiedades_PropertyValueChanged(object sender, PropertyGridItemValueChangedEventArgs e)
        {
            if (e.Item.Name == "NumOperarios")
            {
                PropertyGridItem item = e.Item as PropertyGridItem;
                byte operario = (byte)item.Value;
                byte operarioAnt = (byte)item.OriginalValue;

               TO-DO!!!
            }
        }

 

3. Make a validation before the new value in the Spinner is accepted. If the validation does not pass, the Spinner does not increase.

4. Assign it a rank.

Please...
Can you provide us with some example code to achieve this?

 

Thank you very much!

POCO:

        [Category("Operaciones de cálculo")]
        [DisplayName("Operarios")]
        public byte NumOperarios { get => numOperarios; set => numOperarios = value; }

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Jan 2021
6 answers
162 views
How can I prevent dragging to a specific node? (by type of folders and files). Folders are nodes where you can put another node, and files are nodes where you can't put another node.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jan 2021
1 answer
203 views

Hello, i have a radchartview with Donut series.

I want to change the background of exported image , use this code to change the background 

p_oRadChart.BackColor = Color.Red;
p_oRadChart.ChartElement.BackColor = Color.Red;

It did change the Chart background on UI, but when the exported image background doesn't change.  

string sTempFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath),"temp.jpeg");
string sTempFileLine = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "tempLine.jpeg");
radChartView1.ExportToImage(sTempFile, new Size(690, 360), System.Drawing.Imaging.ImageFormat.Jpeg);
radChartView2.ExportToImage(sTempFileLine, new Size(690, 250), System.Drawing.Imaging.ImageFormat.Jpeg);

Telerik.ChartView version is 2017.3.912.40

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jan 2021
1 answer
103 views

How do I limit the number of characters shown when the text is too long?

For the text "Very Long Text Very Very Long" to take the form "Very Long Text ..."

OR text "VeryLongTextVeryVeryLong" to take the form "VeryLongTextV..."

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jan 2021
1 answer
473 views

How can I disable editing on the desired nodes? Tried through CustomRadTreeViewEditor as below but without success.

public override void BeginEdit()
        {
            TreeNodeElement nodeElement = this.OwnerElement as TreeNodeElement;
            if (nodeElement.Data.Level == 0)
            {
                base.EndEdit();
                return;
            }
            base.BeginEdit();
        }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jan 2021
4 answers
361 views

I can no longer drag a column header to the group by box at the top.  Not sure when this stopped working.  When I click on the column header it is highlighted, but I can not drag it.   Does it have something to do with the drag and drop of rows I added to my app. I am using your provided service for the row drag and drop.  I believe I have everything enabled.

 

                dgvFiles.ShowGroupPanel = true;
                this.dgvFiles.AllowSearchRow = true;
                dgvFiles.Columns[1].AllowGroup = false;  // prevent grouping of Path Column
                dgvFiles.Columns[2].AllowGroup = true;//filename
                dgvFiles.Columns[3].AllowGroup = true;// length
                dgvFiles.Columns[4].AllowGroup = true; // catagory

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jan 2021
1 answer
113 views

i'm trying to compare 2 listview items to check for duplicates

 

one listview is in a form and the other one is in a different open form

 

i get this error :

 

System.InvalidOperationException: 'Collection was modified; enumeration operation may not execute.'

 

how to solve this error please 

invoicesnew master = (invoicesnew)Application.OpenForms["invoicesnew"];
            if (master.radListView1.Items.Count == 0)
            {
                foreach (ListViewDataItem a1234 in radListView1.Items)
                {
                    ListViewDataItem item = new ListViewDataItem();
                    item.SubItems.Add(a1234["Column 0"].ToString());
                    item.SubItems.Add(a1234["Column 1"].ToString());
                    item.SubItems.Add(a1234["Column 2"].ToString());
                    item.SubItems.Add(a1234["Column 3"].ToString());
                    item.SubItems.Add(a1234["Column 4"].ToString());
                    item.SubItems.Add(a1234["Column 5"].ToString());
                    item.SubItems.Add(a1234["Column 6"].ToString());
                    item.SubItems.Add(a1234["Column 7"].ToString());
                    master.radListView1.Items.Add(item);
                    this.Close();
                }
            }
            else
            {
                foreach (ListViewDataItem item in radListView1.Items)
                {
                    foreach (ListViewDataItem a1234 in master.radListView1.Items)
                    {
                        if (item["Column 0"].ToString() == a1234["Column 0"].ToString() && item["Column 1"].ToString() == a1234["Column 1"].ToString())
                        {
 
                            master.radListView1.FilterDescriptors.Clear();
                            master.radListView1.FilterDescriptors.LogicalOperator = FilterLogicalOperator.Or;
                            master.radListView1.FilterDescriptors.Add("Column 0", FilterOperator.Contains, item["Column 0"].ToString());
                            master.radListView1.FilterDescriptors.Add("Column 1", FilterOperator.Contains, item["Column 1"].ToString());
                            master.radListView1.EnableFiltering = true;
                            master.radListView1.SelectedIndex = 0;
 
                            decimal totalin = Convert.ToDecimal(item["Column 7"].ToString());
                            decimal countin = Convert.ToDecimal(item["Column 5"].ToString());
                            decimal totalin1 = Convert.ToDecimal(a1234["Column 7"].ToString());
                            decimal countin1 = Convert.ToDecimal(a1234["Column 5"].ToString());
                            alltotal = (totalin1 + totalin).ToString();
                            allcount = (countin1 + countin).ToString();
                            List<ListViewDataItem> saveSelectedItems = new List<ListViewDataItem>();
 
                            foreach (ListViewDataItem eachItem in master.radListView1.SelectedItems)
                            {
                                saveSelectedItems.Add(eachItem);
                            }
 
                            foreach (ListViewDataItem item3 in saveSelectedItems)
                            {
                                master.radListView1.Items.Remove(item3);
                            }
 
 
 
 
                            ListViewDataItem item1 = new ListViewDataItem();
                            item1.SubItems.Add(item["Column 0"].ToString());
                            item1.SubItems.Add(item["Column 1"].ToString());
                            item1.SubItems.Add(item["Column 2"].ToString());
                            item1.SubItems.Add(item["Column 3"].ToString());
                            item1.SubItems.Add(item["Column 4"].ToString());
                            item1.SubItems.Add(allcount);
                            item1.SubItems.Add(price);
                            item1.SubItems.Add(alltotal);
                            master.radListView1.Items.Add(item1);
                          
 
                        }
                        else
                        {
                            master.radListView1.EnableFiltering = false;
                            calculate();
                            ListViewDataItem item1 = new ListViewDataItem();
                            item1.SubItems.Add(radLabel13.Text);
                            item1.SubItems.Add(radLabel29.Text);
                            item1.SubItems.Add(radLabel15.Text);
                            item1.SubItems.Add(radDropDownList3.Text);
                            item1.SubItems.Add(radLabel24.Text);
                            item1.SubItems.Add(radMaskedEditBox3.Text);
                            item1.SubItems.Add(price);
                            item1.SubItems.Add(total);
                            master.radListView1.Items.Add(item1);
                            this.Close();
                        }
                    }
                }
            }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jan 2021
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?