Print Page | Close Window

FindControl returns null while buttons are visible

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=21895
Printed Date: 26 November 2024 at 11:12pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: FindControl returns null while buttons are visible
Posted By: JoukevRossum
Subject: FindControl returns null while buttons are visible
Date Posted: 24 September 2013 at 6:09am
Hi all,

I'm having some difficulties when using the following command:
CommandBars.ActiveMenuBar.FindControl(XTPControlType.xtpControlButton, buttonID, truefalse);
This command always returns 'null' while the buttons do exist with the right Button ID assigned to it.
How can I fix this problem?
thanks in advance,
Jouke 



Replies:
Posted By: SuperMario
Date Posted: 01 October 2013 at 8:53am
It depends on where the control is.  I'd guess you need to set recursive to True.  With False it will only check top level controls.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net