By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Gridview and RowEditing doesn't work!!

P: n/a
VMI
In my web app, my gridview is attached to a datatable whose rows are
added through a button. So when I click on a button under the
gridview, I add a row to the datatable and databind the gridview again
to reflect the changes. My rowEditing event handler looks like this:

protected void gridView1_RowEditing(object sender,
GridViewEditEventArgs e)
{
this.gridView1.EditIndex = e.NewEditIndex;
// this.gridView1.DataBind(); /* It clears the gridview */
}

The problem is that I need to click on the "Edit" of the row twice in
order for the row to become "Editable". Someone suggested that I
re-bind in the !Page.IsPostBack statement, but I can't because the
dataTable is initially empty (its rows were added through the button
click).
What's the other alternative? How can I eliminate the double-click I
need to do in order to make the Row editable?

Thanks.

Sep 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.