I have a Winform that includes a Grid that my Users can edit by adding/removing columns.
I have an Object ("gridProps" class) that holds all of the "grid" properties,
gridProps.Columns property replaces the default (text) editor with my own popup radForm that works very much like your own "Columns" property for radGrid. When the user clicks into that Property on the PropertyGrid, you get a string representation and a "..." button. Clicking on that button bring up my "Columns Editor" radForm and takes over until "OK" or "Cancel"
Everything works...except: The user can click into "Columns" on the PropertyGrid and it automatically opens the "Textbox" editor inside the PropertyGrid and the user can type away. Nothing happens with this input - my TypeConverter sees to that but they are still allowed to type whatever they want until they click away or hit enter/tab etc.
Is there a way to PREVENT the user from typing anything but STILL ALLOW them to click the "..." button?
I'm trying to mimic exactly how Telerik RadGrid's Columns property works.
Any advice would be helpful and appreciated!
-C
We have been using the TreeView in our software for some time now. However, recently, we noticed that it's not behaving as we have coded it. We had code that changed the Forcolor and Font when a node was selected. However, this doesn't seem to be working anymore. Attached is a sample code. Any help would be greatly appreciated.
FYI, we are using Telerik for Winforms: 2024.3.924.462
TIA
using System;
using System.Collections.Generic;
using System.Drawing;
using Telerik.WinControls;
using Telerik.WinControls.UI;
namespace TestNodeColorChange
{
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
#region Private Fields
private string selectedNodeKey = string.Empty;
#endregion Private Fields
#region Public Constructors
public RadForm1()
{
InitializeComponent();
Load += FormLoading;
}
#endregion Public Constructors
#region Private Methods
private void FormLoading(object sender, EventArgs e)
{
List<TreeViewData> list = new List<TreeViewData>()
{
new TreeViewData { key = 1, DisplayValue = "Level 1" },
new TreeViewData { key = 2, parentKey = 1, DisplayValue = "Branch A" },
new TreeViewData { key = 3, parentKey = 1, DisplayValue = "Branch B" },
new TreeViewData { key = 4, parentKey = 1, DisplayValue = "Branch C" }
};
radTreeView1.ChildMember = "key";
radTreeView1.DisplayMember = "DisplayValue";
radTreeView1.ParentMember = "parentKey";
radTreeView1.DataSource = list;
radTreeView1.ExpandAll();
radTreeView1.SelectedNodeChanged += SelectedNodeChanged;
radTreeView1.NodeFormatting += NodeFormatting;
}
private void NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
if (e.NodeElement is LightVisualElement lve)
{
lve.ResetValue(VisualElement.ForeColorProperty, ValueResetFlags.Local);
lve.ResetValue(VisualElement.FontProperty, ValueResetFlags.Local);
if (e.Node.Value.ToString() == selectedNodeKey)
{
lve.Font = new Font(lve.Font.FontFamily, lve.Font.Size, FontStyle.Bold);
lve.ForeColor = Color.Purple;
radTreeView1.NodeFormatting -= NodeFormatting;
radTreeView1.Refresh();
radTreeView1.NodeFormatting += NodeFormatting;
Console.WriteLine("NodeFormatting: " + selectedNodeKey);
Console.WriteLine("NodeFormatting: " + e.NodeElement.ForeColor.ToString());
Console.WriteLine("NodeFormatting: " + ((e.NodeElement.Font.Style & FontStyle.Bold) != 0));
}
}
}
private void SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
{
selectedNodeKey = e.Node.Value.ToString();
Console.WriteLine("SelectedNodeChanged: " + selectedNodeKey);
radTreeView1.Nodes.Refresh();
}
#endregion Private Methods
#region Internal Classes
internal class TreeViewData
{
#region Public Properties
public string DisplayValue { get; set; }
public int key { get; set; }
public int? parentKey { get; set; }
#endregion Public Properties
}
#endregion Internal Classes
}
}
Hi,
I've been struggling to work out how to export the current pdf page as shown in the pdfViewer after it has been rotated using controls in the pdfViewerNavigator. I'm trying to save the image in png format but it seems to export the page in the original orientation ignoring the applied rotation.
Also whilst searching the forum for a solution, I came across the code
this.radPdfViewer1.PdfViewerElement.CurrentPage.PageNo
but it appears that PageNo no longer exists in 2020.3.1020.
Currently i'm using
pdfViewer.ExportPage ( 0, _tempImageFileName, 1.0, true, ImageFormat.Png );
which exports the first page as a png, which works, I just need to save the currently selected page that may or may not have been rotated.
Is this possible, if so how ?
Dear Sir
When I using the demo winform (version. 2025 Q1), all the menu drop-down menus were not displayed in the correct position for the first time. Include the controls of menus and ribbon bar in hidden mode. Could you please checked the display problem. Is there any solution to prevent the error from showing? Thanks.
Hi
I have a GridView with a relational hierarchy of two levels connected via two manual relations and two templates.
gridViewRelation1.ChildColumnNames.Add("AktivitaetVorgang");
gridViewRelation1.ChildTemplate = this.templateFremdeAktivitaetVorgaenge;
gridViewRelation1.ParentTemplate = this.radGridPsz.MasterTemplate;
gridViewRelation1.RelationName = "relationAktivitaetVorgang";
gridViewRelation2.ChildColumnNames.Add("VorgangHandlungsBedarf");
gridViewRelation2.ChildTemplate = this.templateFremdeVorgangHandlungsbedarfe;
gridViewRelation2.ParentTemplate = this.templateFremdeAktivitaetVorgaenge;
gridViewRelation2.RelationName = "relationVorgangHandlungsbedarfe";
this.radGridPsz.Relations.AddRange(new Telerik.WinControls.UI.GridViewRelation[] {
gridViewRelation1,
gridViewRelation2});
The template of the second level is added to the Maintemplate, the template of the third level is added to the template of the second level.
Everything is working fine at first.
But if I save the layout of the grid and reload it after closing and opening the application again (via radGrid.SaveLayout and radGrid.LoadLayout), there are no rows in the third level, although the datasource is the same, and they were there in the beginning.
The rows of the second level do not have childRows although the templates and relations are still there
Hi
I am designing a WinForm App using UI for WinForms (ver. 2025 Q1). Is there any solution to add a search box to the radform title bar? It looks like the search box at th top of Microsoft Outlook 365 application.
Hi everyone, i use Telerik.WinControls.UI.Barcode to generate QR and every thing is fine with android reads, but IOS read said No usable data found. Could you help me? This is my code
private void PrintDoc_PrintPage(object sender, PrintPageEventArgs e)