E
Eddie Celebi
Folks
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
something.
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 = "";
else
t.Text = val.ToString();
t.ID = "DateCol";
string id = t.ID.ToString();
// t.Attributes.Add("onchange","ConvertDate(" + "grid__ctl12_DateCol" +
".value)");
t.Attributes.Add("onchange","ConvertDate(" + "DateCol" + ".value)");
Any help most welcome.
Eddie
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
something.
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 = "";
else
t.Text = val.ToString();
t.ID = "DateCol";
string id = t.ID.ToString();
// t.Attributes.Add("onchange","ConvertDate(" + "grid__ctl12_DateCol" +
".value)");
t.Attributes.Add("onchange","ConvertDate(" + "DateCol" + ".value)");
Any help most welcome.
Eddie