adding controls

3 posts, 0 answers
  1. rashad kabbara
    rashad kabbara avatar
    25 posts
    Member since:
    May 2010

    Posted 14 Jun 2010 Link to this post

    i am creating a custom control (RCB) that extends RadComboBox.
    i want to add a child control(textbox) for the RCB, so whenever an RCB is created,  a textbox will be created.
    i managed to do this by overrideing OnPagePreLoad of RadComboBox, and add Page.Form.Controls.Add(textbox);

    everything works fine (ie. textbox is created with every RadComboBox) untill i use RCB in a gridview edit panel (where only RadComboBox is created  and not the textbox).

    how can i fix this issue?is there a better way to add a control to another control?

     

     

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

    Posted 14 Jun 2010 Link to this post

    Hello,

    Checkout the part "Adding templates at runtime" in the following documentation. I hope this would helpful for you.
    Adding Templates

    -Shinu.
  3. rashad kabbara
    rashad kabbara avatar
    25 posts
    Member since:
    May 2010

    Posted 14 Jun 2010 Link to this post

    i am not interested in adding templates to RadComboBox. i just want to create a textbox above every RadComboBox.therefore i created the RCB class that extends the RadComboBox and added Page.Form.Controls.Add(textbox); so a textbox is created above every RadComboBox. This is working for every RadComboBox in all pages, except the RadComboBox in a radgrid edit panel. (in radgrid edit panel, the textbox is not created).
Back to Top