The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi there,
Is there any replacement for the below code in the SyncFusion Controls
System.Windows.Forms.Control Ctrl;
foreach (System.Windows.Forms.Control ctrl in ctrl.Controls)
All my forms are using SyncFusion Controls like TextBox, Combobox, TreeView.
Thanks
Satish
ADAdministrator Syncfusion Team May 17, 2004 07:57 AM UTC
Syncfusion UI controls are derived from System.Windows.Forms.Control, so you can loop through a Syncfusion control''s Control collection using the similar code.
Eactly what are you trying to do that is not working for you?
SASatishMay 18, 2004 09:43 AM UTC
Thanks for your reply.
I want to change the background color the control at runtime for all the controls on the form.
Assuming that, we have both Windows control as well as Syncfusion Control.
Now My problem is how can loop through the Syncfusion Control. I could able to loop through the Windows control
Thanks
Satish
>Syncfusion UI controls are derived from System.Windows.Forms.Control, so you can loop through a Syncfusion control''s Control collection using the similar code.
>
>Eactly what are you trying to do that is not working for you?
ADAdministrator Syncfusion Team May 18, 2004 10:20 AM UTC
When you loop through your form1.Controls, it should return both Windows Forms controls and Syncfusion controls that have been added to the form''s Control''s collection. At this point, the Syncfusion controls are just Windows Forms controls.
One other comment is that to loop through all controls on a form, you need to do it recursively. Container controls like panels and groupboxes can host child controls in its controls collection.
(Note, if one of these Controls is a GridControlBase (GridControl or GridDataBoundGrid), setting Control.BackColor will not affect the look of the grid. Instead you would have to set GridControlBasae.TableStyle.BackColor).