Hello,
When you try to edit last cell in last row of WebDataGrid and then leave this cell with some changes made there's a postback executed (it is caused by unnesessory triggering of "TriggerCommit" event) which is not executed for the cells above of same column and any other cells in the last row.
To repoduce do following:
1 -add grid to page
2 - make last column editable
3 - do not enable Activation Behavior to enable switching between rows without posbacks
4 - double click on any not last cell of last grid column and edit value (see that lost of focus doesn't trigger "TriggerCommit" event)
5 - double click on last cell of last row, edit value and leave this edit box by clicking anywhere on the grid
6 - Misterious "TriggerCommit" is fired and all made changes are lost
I cannot tell any more details about triggering of "TriggerCommit" event as there's no actual callstack for it.
This event is side effect of
/* VS 05/15/2009 Bug 17637. Scrollbars in Firefox do not take focus away from editor *//* remove scroll listeners from containers of grid */var i = this._scrollDIVs ? this._scrollDIVs.length : 0;while (i-- > 0) $removeHandler(this._scrollDIVs[i], 'scroll', this._stopEditHandler);
in
exitEditMode: function (update)
method.
That is all I know for now.Can some one help? This extra event trigger prevents my application fro runniing correctly.
I'm using 10.3.20103.2217 version of control.
UPD: Can this be a reason of descripbed behavior?
/* OK 4/22/2011 73459 - Update of the last row of the grid does not fire RowUpdating Event */_forceUpdateCommit: function ()
Hello Andrey,
Unfortunately usage of batch updating is the main possibility in this situation since grid updating cannot work correctly when Activation behavior is disabled.
Another possibility is to use following guide showing how to simulate Batch updating with grid versions prior to 11.2 - http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebDataGrid_Conditional_Batch_Updating_in_WebDataGrid.html
This type of functionality however will be available only for data sources like “ObjectDataSource” and “SqlDataSource” and can be considered as a temporary solution.
Hello, Alex
10v3 does not contain this feature unfortunately. We plan to migrate to 12.1 but now I have to use empty column to make everything work as it should.
Andrey.
I can strongly recommend you to use our new “BatchUpdating” feature available for the grid in order to achieve the needed scenario.
Live sample of “BatchUpdating” you can view and test here - http://samples.infragistics.com/aspnet/Samples/WebDataGrid/EditingAndSelection/BatchUpdating/Default.aspx?cn=data-grid&sid=be403a2e-c9bf-4922-b0a4-d17ced5b1e02
You also should remove first column of grid by simply deleting this
= new TemplateDataField { Key = "RowIdent", Hidden = false, ItemTemplate = new ImageTemplate { TextFieldName = "RowIdent", ImageConverter = rowView => { DataRowView row = (DataRowView)rowView; if (row["RowIdent"] is int) return ((int)row["RowIdent"] & 1) == 0 ? "error.gif" : "warning.gif"; if (row["RowIdent"] is string) return (int.Parse((string)row["RowIdent"]) & 1) == 0 ? "error.gif" : "warning.gif"; return null; } }
in void MakeGrid()
My fault. You should change this
col = new TemplateDataField { Key = "State", ItemTemplate = new CheckBoxTemplate { ValueFieldName = "Customer.State", CheckedImageUrl = "/ig_res/Appletini/images/ig_checkbox_on.gif", NotCheckedImageUrl = "/ig_res/Appletini/images/ig_checkbox_off.gif" } };
to this
col = new BoundDataField { Key = "Customer.State", };
in void MakeGrid() to make it work.