Ask a Question related to ASP.NET Data Grid Control, Design and Development.
Eddie Celebi #1
I want to call a vbscript function from a dynamically created template edit
control but I am having trouble with autogenerated control ID I set
control.ID = "X" but when its rendered it has become grid:ctrl12:X or
How can I get round this issue. I either need to be able to set it and
datagrid not to change it or get the generated one.
I set the call in OnDataBinding event eg
public void OnDataBinding(object sender, EventArgs e)
TextBox t = (TextBox) sender;
DataGridItem container = (DataGridItem) t.NamingContainer;
object val = ((DataRowView) container.DataItem)[colname];
if (val == null)
t.Text = "";
t.Text = val.ToString();
t.ID = "DateCol";
string id = t.ID.ToString();
// t.Attributes.Add("onchange","ConvertDate(" + "grid__ctl12_DateCol" +
t.Attributes.Add("onchange","ConvertDate(" + "DateCol" + ".value)");
Any help most welcome.
Eddie Celebi Guest
Possible to create a composite control that has a child control that is a validator that validates the composite control itself?I am attempting to create a composite control which has a label, followed by an optional error message, followed by two text boxes. I have...
Hi Everybody, I'm creating a composite control in C# that basically renders a bunch of webcontrols such as <asp:Label />, <asp:Repeater />,...
Hi, I have built a custom control that build a table with 3 cells in it. The custom control is designed to add all child controls to cell#2,...
ControlDesigner not invoked on custom control when control is rendered within another custom controlI have a custom control that has a simple designer (derived from System.Web.UI.Design.ControlDesigner) associated with it (using the...
All, I have written a very simple custom composite control that includes a control of type System.Web.UI.WebControls.Table. The control...
Zürcher See #2
Is it possible to reset the counter of the automatic id generator of the
When I add a Control to a new ControlCollection it recive the id "ctl1", if
the ControlCollection is cleared, the automatic counter won't be reset and
the next added control recive the id "ctl2".
Zürcher See Guest
Kannan.V [MCSD.net] #3
RE: Control ID
any reason as to why u need to reset the counter,
You can assign an ID to the control at design time.
Dont implement the inaming container interface to prevent prefixing the
controls with "ctlxxx".
"ZÃ¼rcher See" wrote:
> Is it possible to reset the counter of the automatic id generator of the
> When I add a Control to a new ControlCollection it recive the id "ctl1", if
> the ControlCollection is cleared, the automatic counter won't be reset and
> the next added control recive the id "ctl2".
>Kannan.V [MCSD.net] Guest