Sorry anonymous, please forgive my terrible spelling.
Just to make it clear.
I want replace the edit row which displays data in textboxes to
display the dat aas dropdowns. I can add dropdowns but I cant remove
the textboxes and I am not sure how to refer them.
How should I go about solving this?
Thanks again,
hamsters
On Nov 13, 10:00 am, anonymoushamster <anonymoushams...@gmail.com>
wrote:
> Sorry anonymous, please forgive my terrible spelling.
>
[quoted text clipped - 8 lines]
> Thanks again,
> hamsters
You can use the OnRowEditing event of the gridview to specify you own
event handler :
<asp:GridView ID="GridView1" runat="server" ...
OnRowEditing="editRow" />
In your code you add an event handling method :
protected void editRow(object sender, GridViewEditEventArgs e)
{
e.Cancel = true;
GridView1.Rows[e.NewEditIndex].Cells[0].Text = "Changed";
}
e.Cancel = true; will disable the event and asp.net won't add the
textbox.
e.NewEditIndex is the row index of the selected row.
>From there you can call your code to generate the dropdown list, I'm
not sure how the RowUpdating event will be affected by this, but you
can always custom handle that also.
hamsterchaos@gmail.com - 13 Nov 2007 15:39 GMT
On Nov 13, 3:31 pm, "Gai...@gmail.com" <Gai...@gmail.com> wrote:
> On Nov 13, 10:00 am, anonymoushamster <anonymoushams...@gmail.com>
> wrote:
[quoted text clipped - 34 lines]
> not sure how the RowUpdating event will be affected by this, but you
> can always custom handle that also.
actually htis is a far superior solution - thank you very much!
On Nov 13, 3:00 pm, anonymoushamster <anonymoushams...@gmail.com>
wrote:
> Sorry anonymous, please forgive my terrible spelling.
>
[quoted text clipped - 8 lines]
> Thanks again,
> hamsters
autogenerate columns must be off - sorted