Is there any replacement for the below code in the SyncFusion Controls
foreach (System.Windows.Forms.Control ctrl in ctrl.Controls)
All my forms are using SyncFusion Controls like TextBox, Combobox, TreeView.
ADAdministrator Syncfusion Team May 17, 2004 03:57 AM
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 05:43 AM
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
>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 06:20 AM
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).