We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date


I'm trying to get a handle on barItems so I can change their visible property. mainFrameBarManagerRT.GetBarItemFromBarItemID always returns a null reference. Here's the code (rmir.BarItemID is a string holding the value of a BarItem's ID property): if (rmir.Visible == true) { BarItemID id = new BarItemID(); id.barItemID = rmir.BarItemID; BarItem bi = mainFrameBarManagerRT.GetBarItemFromBarItemID(id); if (bi != null) bi.Visible = true; } Is this method supposed to find a BarItem object based on the string value? Is there a better way to search for a specific BarItem object based on its ID?

2 Replies

AS Arun Srinivasan Syncfusion Team November 12, 2003 06:16 PM UTC

Hi Ken Here is what you could try to get it working: //Open is a known id for a baritem BarItem bi = this.mainFrameBarManager1.Items.FindItem("Open"); bi.Visible = false; Regards Arun

KL Ken Law November 13, 2003 03:37 PM UTC

Thanks, that works as expected. I'm still curious why there is a BarItemID class and the GetBarItemFromBarItemID method. For future or internal use?

Live Chat Icon For mobile
Up arrow icon