finding controls in radtoolbar items

2 posts, 0 answers
  1. ldc0618
    ldc0618 avatar
    8 posts
    Member since:
    Jun 2007

    Posted 21 Apr 2010 Link to this post

    I have a combox inside a itemtemplate for a RadToolBarButton. Once I have buried the control in the itemTemplate, I can no longer access it in code behind. Is that correct? So the only way I can access the control is to do something similar to:

    RadComboBox cmbPresets = (RadComboBox)rtbMenuAdmin.FindItemByText("Preset").FindControl("cmbPresets");

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Apr 2010 Link to this post


    In order to get a reference to the embedded control in ItemTemplate of RadToolBar, locate the RadToolBarItem that has the template, and use its FindControl() method. I think your code works fine.

    Here is the documentation describing how to Access Controls Inside Templates.


Back to Top