Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 10, 2008 05:48 PM by gbt74
Jun 22, 2006 11:20 AM|LINK
I am developing an extended GridView.
I have added a new event which is double click, and that event will be fired in a CallBack, everything now works fine, except that, I need to set the Grid in the Edit Mode. The method below is called from the RaiseCallBackEvent method, it is setting the
SelectedIndex right, but the problem is that, the Row is not set in the EditMode.
Am I missing anything?
protected virtual void OnRowDoubleClick(RowDoubleClickEventArgs e)
// Set a selection in the Grid
int rowIndex = e.GridViewRow.RowIndex;
// Select the row
this.SelectedIndex = rowIndex;
// Set the edit row
this.EditIndex = rowIndex;
// Change the row state
this.Rows[rowIndex].RowState = DataControlRowState.Edit;
RowDoubleClickEventHandler handler1 = (RowDoubleClickEventHandler)base.Events[xGrid.EventRowDoubleClick];
if (handler1 != null)
Thanks a lot.
Jun 22, 2006 11:53 AM|LINK
Once you set the EditIndex, I believe you must rebind your GridView to the DataSource.
Jun 23, 2006 08:09 AM|LINK
Well, I added the Grid.Databind() and now the row is being shown in the Edit Mode. But, when I click Update linkbutton, it just posts back, I have to click it again to update the data. Any ideas?
Jun 28, 2006 05:11 PM|LINK
Jul 03, 2006 08:28 PM|LINK
Hello Polita: How are you? Hope all is fine.
I was away from my home for one week, now I am back!
I am attaching the code for you, you have mainly two properties till now, one to EnableRowClick and one to EnableEditCallback, the second when you double click, the row is in editable mode, but when I click update nothing happens, no update is done.
Because the code is too big, I will be sending it to you by email!
Feb 16, 2007 07:52 PM|LINK
Feb 22, 2007 04:31 PM|LINK
Feb 22, 2007 05:26 PM|LINK
Feb 22, 2007 05:52 PM|LINK
Yes. I got RowUpdating event working correctly with just one click. But I still need two clicks on Edit button to get the control in edit mode. Dont know why.
gvabc.EditIndex = -1;
Note: I have changed the variable names to protect the identity.
Feb 22, 2007 06:33 PM|LINK