S
SRGTech_Max
Hello
I am a beginner at creating composite web controls. What I am trying to do
it add functionality to the DataGrid webcontrol by adding two dropdowns, a
textbox and two buttons to it (for search-capabilities)
I have created a new class (DataGridFilter) derived from DataGrid
e.g. public class DataGridFilter : DataGrid, INamingContainer{}
I have overriden the CreateChildControls method and added the new controls
(dropdowns, textbox, etc.) to the Controls collection
e.g.
DropDownList ddlColumnNames = new DropDownList();
Controls.Add(ddlColumnNames);
When I test the control (bind it with data on a webform), the only output i
get is the datagrid. It doesn't keep/draw all the controls I have created in
the CreateChildControls function.
What am I doing wrong? (I shouldn't have to mess with the Render method
since this is a composite web custom control, right?)
Let me know if you need to see more code. Any help is appreciated.
Thanks
I am a beginner at creating composite web controls. What I am trying to do
it add functionality to the DataGrid webcontrol by adding two dropdowns, a
textbox and two buttons to it (for search-capabilities)
I have created a new class (DataGridFilter) derived from DataGrid
e.g. public class DataGridFilter : DataGrid, INamingContainer{}
I have overriden the CreateChildControls method and added the new controls
(dropdowns, textbox, etc.) to the Controls collection
e.g.
DropDownList ddlColumnNames = new DropDownList();
Controls.Add(ddlColumnNames);
When I test the control (bind it with data on a webform), the only output i
get is the datagrid. It doesn't keep/draw all the controls I have created in
the CreateChildControls function.
What am I doing wrong? (I shouldn't have to mess with the Render method
since this is a composite web custom control, right?)
Let me know if you need to see more code. Any help is appreciated.
Thanks