Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
How to programmatically find an infragistics control on a winform
posted

How can i programmatically find a infragistics control on a form. For e.g., a ultraToolbar is located on a winform, but i am trying to access it from within a usercontrol on the winform. I need to be able to do something like this

frmDialog dia = (frmDialog)FindForm();

Infragistics.Win.UltraWinToolbars.UltraToolbar toolBar = (Infragistics.Win.UltraWinToolbars.UltraToolbar)dia.Controls["ultraToolbarsManager"];

but of course i get an error saying that i can't convert a winform to an ifragistics object. Do you know how i can get around this?

 

Please it's very urgent

 

Thanks in advance

Parents
  • 17259
    Verified Answer
    Offline posted

    I don't think the conversion is the problem. The toolbars manager is not part of the Controls collection at all.

    The toolbars manager is a private or protected member of the form, so you can define a public property in the form code that returns the manager and access it through this property.

Reply Children
No Data