Telerik Forums
UI for WinForms Forum
1 answer
149 views
Is there a way to set each bar to an individual color within a barseries in a RadChartView?   I have done it with multiple series but the need to be able to sort the bars based on a property and I can not find how to sort across multiple series.  Right now it looks like I could put all the data in a single series and order it how I need it displayed but each group of datapoints will need to have an individual color.  The attached image shows a working chart but it has 4 series and I need to sort by value.
Dinko | Tech Support Engineer
Telerik team
 answered on 28 Aug 2023
1 answer
405 views

Hi,
     How to change fore color for specific node ?  i have 3 level node and want to change fore color for 3rd level node only, below the code i used but not color not changed. 

        Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
Dim filePath As String = "20230824.124217\20230824.1242174616\00001.tif" Dim filenode As String() = filePath.Split("\") Dim addNode As String = "" For i = 0 To filenode.Count - 1 If addNode = "" Then addNode = filenode(i) Else addNode = addNode & "\" & filenode(i) End If Dim searchKey As String = addNode Dim nodeExists As Boolean = CheckNodeExists(RadTreeView1.Nodes, searchKey) If Not nodeExists Then RadTreeView1.ForeColor = Color.Red Dim folderNode As RadTreeNode = New RadTreeNode() folderNode.ForeColor = System.Drawing.Color.Green RadTreeView1.AddNodeByPath(addNode) End If Next RadTreeView1.Update() RadTreeView1.Refresh() 
End Sub


Private Function CheckNodeExists(nodes As RadTreeNodeCollection, searchKey As String) As Boolean
        For Each node As RadTreeNode In nodes
            If node.FullPath = searchKey Then
                ' Node found
                Return True
            End If

            ' Recursively check child nodes
            If node.Nodes.Count > 0 Then
                If CheckNodeExists(node.Nodes, searchKey) Then
                    Return True
                End If
            End If
        Next

        ' Node not found
        Return False
    End Function

   

Pls reply asap.


Thanks and Regards
Aravind

 
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 28 Aug 2023
1 answer
122 views

hi all,

I am trying to set some RadDataEntry RadTextBox as ReadOnly, as shown in the following link 

https://www.telerik.com/forums/raddataentry-controls-readonly

Here is my code :

    private void rdeDynamicInput_ItemInitialized(object sender, ItemInitializedEventArgs e)
    {
            if (e.Panel.Controls[0].GetType().ToString() == "Telerik.WinControls.UI.RadCheckBox" ||
                e.Panel.Controls[0].GetType().ToString() == "Telerik.WinControls.UI.RadTextBox")
                  {
                   ((RadTextBox)e.Panel.Controls[0]).ReadOnly = true;
                  }
    }
This code seems to work and checking the control after the instruction shows the attribute set to true, but the display doesn't change and the control stay writable.

 

Thanks for your help

Best

Patrick

Patgat
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 24 Aug 2023
1 answer
168 views

how do I move the pre-built "Delete Row" option to the bottom or move my options to the top?


		private void dgvSIQ_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
		{
			RadMenuItem mniProcess = new RadMenuItem();
			RadMenuItem mniVendorInquiry = new RadMenuItem();
			RadMenuSeparatorItem mniSeparate = new RadMenuSeparatorItem();

			e.ContextMenu.Items[0].Visibility = ElementVisibility.Collapsed;
			e.ContextMenu.Items[1].Visibility = ElementVisibility.Collapsed;

			mniProcess.Text = "Process PO";
			mniVendorInquiry.Text = "Vendor Inquiry";
			//e.ContextMenu.Items.Add(mniSeparate);
			e.ContextMenu.Items.Add(mniVendorInquiry);
			e.ContextMenu.Items.Add(mniProcess);

			try
			{
				mniProcess.Click += mniProcess_Click;
				mniVendorInquiry.Click += mniVendorInquiry_Click;
			}
			catch (Exception)
			{
			}

		}

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Aug 2023
1 answer
204 views

Hello.  Our application is using Telerik WinControls from Q1 2022.

We have a number of context menus where we wish to conditionally disable menu items and show a tooltip that explains why the menu item is disabled.  The problem is that when the menu item is disabled then no tooltip is displayed!

How do we get tooltips to display even when the menu item is disabled?

In the following example we would not see the tooltip when menuItem.Enabled = false;  Can we get a fix for this?  Our work-around is causing other problems.

RadContextMenu contextMenu = new RadContextMenu();

RadMenuItem menuItem = new RadMenuItem("View in Browser");

contextMenu.Items.Add(menuItem);

if (supportsBrowser())

{

     menuItem.Tooltip = "Open your browser";

}

else

{

     menuItem.Enabled = false;

     menuItem.Tooltip = "This device does not support browser access.";

}

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Aug 2023
1 answer
121 views

i want to hide the captionbar in ribbonbar ,which property should i use ?

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Aug 2023
1 answer
126 views

Hi! 

Showing a row error message and the warning icon can be achieved by implementing the IDataErrorInfo interface in the data source that's used for the grid, but I'd like to do the same for the child-items in the lazy-loaded hierarchy view (i.e. show a row error for the main object if one of the sub items is incorrect, but after expanding the child items also show an error icon for the individual sub-rows that are incorrect), but somehow the grid is ignoring the IDataErrorInfo implemented in the child objects. Is this an intended behaviour? 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Aug 2023
1 answer
121 views

I need to display a list of radio button elements, for that I did is created a rad panel, inside the rad panel I added a WrapLayoutpanel, Inside that I added the list of RadRadioButtonElement, The problem I am facing is if the court of the RadRadioButtonElement increases the text are truncated, It works in bigger resolution but not in smaller one, I kind of figure out if the width of the RadRadioButtonElement is greater than the text are not rendered right.

Sample code

 Private _WindowsControl As Control
    

Private _RadioButtonPanel As RadElement

 

Public Overrides Sub SetupUIElements()
        Me.TitlePanel.Margin = New Padding(0005)
        Dim minSize As New Size(5050)
        Dim radPanel = New RadPanel() With
            {
                .AutoSize = True,
                .MinimumSize = minSize
            }
        radPanel.PanelElement.PanelBorder.Visibility = ElementVisibility.Collapsed
        Me.Controls.Add(radPanel)
        _RadioButtonPanel = New WrapLayoutPanel() With
            {
                .AutoSize = True,
                .AutoSizeMode = RadAutoSizeMode.WrapAroundChildren,
                .Orientation = Orientation.Vertical,
                .StretchHorizontally = False,
                .StretchVertically = False
            }
        radPanel.RootElement.Children.Add(_RadioButtonPanel)
        _WindowsControl = radPanel
        For Each attrValue As StudyAttributeValue In Attribute.Values
            Dim radioButton = New RadRadioButtonElement() With
                {
                    .Padding = New Padding(20000),
                    .Text = attrValue.Description,
                    .IsChecked = attrValue.Selected,
                    .AutoSize = True
                }
            AddHandler radioButton.Click, AddressOf ValueChangedEventHandler
            _RadioButtonPanel.Children.Add(radioButton)
        Next
        
    

End Sub

 

 Private Sub Parent_SizeChanged(sender As Object, e As EventArgs)
        Dim parent As Control = DirectCast(sender, Control)
        If _WindowsControl IsNot Nothing Then
            Dim minSize = parent.Size
            minSize.Height -= TitlePanel.Size.Height
            minSize -= New Size(100100)
            _WindowsControl.MinimumSize = minSize
        End If
    

End Sub

 

This is an issue in production, and I need help resolving this, Please advise

 

Thanks

 

Dinko | Tech Support Engineer
Telerik team
 answered on 15 Aug 2023
1 answer
172 views

I have several RadTextBox controls on a form and want to use a single RadContextMenu to provide my own context menu. Depening on which control is selected the resulting action will be a little different. 

I have this code to assign my context menus to the 2 controls.

this.txtBreedersAccount.TextBoxElement.TextBoxItem.HostedControl.ContextMenu = new ContextMenu();
this.txtBreedersAccount.TextBoxElement.TextBoxItem.HostedControl.MouseDown += new MouseEventHandler(this.AccountContextMenu_MouseDown);
this.txtMemberAccount.TextBoxElement.TextBoxItem.HostedControl.ContextMenu = new ContextMenu();
this.txtMemberAccount.TextBoxElement.TextBoxItem.HostedControl.MouseClick += new MouseEventHandler(this.AccountContextMenu_MouseDown);

This is my MouseDown procedure.

   private void AccountContextMenu_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {                
                this.cmnuAccount.Show(MousePosition);
            }
        }

All of this works perfectly. My issue is the I can't seem to find a way to determine which of my 2 controls was actually used to instantiate the RadContextMenu. Searching the closest I could get was something like this, but it doesn't work.

        private void cmnuAccount_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs e)
        {
            RadElement element = sender as RadElement;

            if (element == null)
            {
                return;
            }

            this._currentControl = element.ElementTree.Control as RadControl;
        }

Textboxes seem to be treated differently than other RadControls. If I setup the context menu on a checkbox for example it work without any issues.

I'd appreciate any help that anyone could give. Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Aug 2023
1 answer
152 views

how to refresh the radtreeview ui while the datasource of the radtreeview changed .for example add or update one record

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Aug 2023
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
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?