This is a migrated thread and some comments may be shown as answers.

adding controls

2 Answers 71 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
rashad kabbara
Top achievements
Rank 1
rashad kabbara asked on 14 Jun 2010, 08:38 AM

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 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Jun 2010, 09:12 AM
Hello,

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

-Shinu.
0
rashad kabbara
Top achievements
Rank 1
answered on 14 Jun 2010, 09:20 AM
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).
Tags
ComboBox
Asked by
rashad kabbara
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
rashad kabbara
Top achievements
Rank 1
Share this question
or