B
Beemer Biker
It was hard enough to code up a drop down list template, now I cannot seem
to get the results of the change event fireing back. Properties for the
combobox template show that the name is:
Gridview1.Column13combo.ItemTemplate.DDL_ChangeImage
Problem is, DDL_ChangeImage does not seem to exist. It should have shown up
using "this.DDL_ChangeImage" All is see in intellisense is the
this.DDL_ChangeImage_TextChanged event. I cannot find "Column13combo"
defined anywhere using intellisense nor the control "DDL_ChangeImage"
I would have thought that the TextChanged event would have provided the
text for me. No such luck, "e" seems really plain and I have never figured
out what "sender" is good for. Maybe it can be cast to something useful??
...anyway i tried the following and googled a lot before posting here..
protected void DDL_ChangeImage_TextChanged(object sender, EventArgs e)
{
I tried the following which didnt work because gvr was null
GridViewRow gvr = GridView1.SelectedRow;
DropDownList ddl = (DropDownList)gvr.Cells[13].Controls[0];
Response.Write("new index is " + ddl.Text + "<br>");
}
the following had the same problem. it fired, but I have no idea how to get
the index value.
protected void DDL_ChangeImage_SelectedIndexChanged(object sender, EventArgs
e)
{
}
==========A SECOND QUESTION==========
why was SelectedRow null? Since I clicked on the combo box, the grid should
have known what row I was at. Doesnt GridView1.SelectedRow return the
current row object?
to get the results of the change event fireing back. Properties for the
combobox template show that the name is:
Gridview1.Column13combo.ItemTemplate.DDL_ChangeImage
Problem is, DDL_ChangeImage does not seem to exist. It should have shown up
using "this.DDL_ChangeImage" All is see in intellisense is the
this.DDL_ChangeImage_TextChanged event. I cannot find "Column13combo"
defined anywhere using intellisense nor the control "DDL_ChangeImage"
I would have thought that the TextChanged event would have provided the
text for me. No such luck, "e" seems really plain and I have never figured
out what "sender" is good for. Maybe it can be cast to something useful??
...anyway i tried the following and googled a lot before posting here..
protected void DDL_ChangeImage_TextChanged(object sender, EventArgs e)
{
I tried the following which didnt work because gvr was null
GridViewRow gvr = GridView1.SelectedRow;
DropDownList ddl = (DropDownList)gvr.Cells[13].Controls[0];
Response.Write("new index is " + ddl.Text + "<br>");
}
the following had the same problem. it fired, but I have no idea how to get
the index value.
protected void DDL_ChangeImage_SelectedIndexChanged(object sender, EventArgs
e)
{
}
==========A SECOND QUESTION==========
why was SelectedRow null? Since I clicked on the combo box, the grid should
have known what row I was at. Doesnt GridView1.SelectedRow return the
current row object?