Hey there,
I am using Jquery 2012 vol 1 and while using igGrid, if I add 2 rows and delete one of them then transactions count submitted to action should be 1 but it is 3 as this is creating 2 transactions for newrow and deleterow.
am i missing something to implement new feature (Grid Net Transactions)?
my view is :
@Using Html.BeginForm("SaveAgreements", "Contact", FormMethod.Post, New With {.id = "AgreementForm"}) @<fieldset> <legend>Contact Agreements</legend> @(Html.Infragistics().Grid(Of Advantage.Web.Objects.ContactAgreementListItem) _ .ID("grid1").PrimaryKey("AgreementId") _ .AutoGenerateColumns(False) _ .Columns(Function(columns) columns.For(Function(c) c.AgreementId).HeaderText("Agreement ID").DataType("number").Hidden(True) columns.For(Function(c) c.AgreementTypeId).HeaderText("Agreement Type").DataType("number").Width(300) columns.For(Function(c) c.SentDate).HeaderText("Sent Date").DataType("date") columns.For(Function(c) c.ReceivedDate).HeaderText("Received Date").DataType("date") columns.For(Function(c) c.EffDate).HeaderText("Effective Date").DataType("date") columns.For(Function(c) c.ExpDate).HeaderText("Expiration Date").DataType("date") End Function) _ .Features(Function(features) features.Sorting().CaseSensitive(False).Mode(SortingMode.Single).Type(OpType.Local) features.Resizing() features.Filtering.Type(OpType.Local).Mode(FilterMode.Simple) features.Selection().Mode(SelectionMode.Row).MultipleSelection(False) features.Updating().ShowDoneCancelButtons(True).DeleteRowTooltip("Delete Agreement").EnableAddRow(True).EnableDeleteRow(True).AddRowLabel("Add Agreement").AddRowTooltip("Add Agreement").EditMode(GridEditMode.Row).ColumnSettings(Function(column) column.ColumnSetting.ColumnKey("AgreementTypeId").EditorType(ColumnEditorType.Combo).Required(True).Validation(True).ComboEditorOptions(Function(combo) combo.Mode(ComboMode.DropDown).SelectItemBySpaceKey(True).EnableClearButton(False).DropDownOnFocus(True).TextKey("AgreementType").ValueKey("AgreementTypeId").DataSource(ViewData("AgreementTypes")) End Function) column.ColumnSetting.ColumnKey("SentDate").EditorType(ColumnEditorType.DatePicker) column.ColumnSetting.ColumnKey("ReceivedDate").EditorType(ColumnEditorType.DatePicker) column.ColumnSetting.ColumnKey("EffDate").EditorType(ColumnEditorType.DatePicker) column.ColumnSetting.ColumnKey("ExpDate").EditorType(ColumnEditorType.DatePicker) End Function) End Function) _ .AutoCommit(True) _ .UpdateUrl(Url.action("UpdateAgreements")) _ .DataSource(ViewData("Agreements")) _ .RenderCheckboxes(True) _ .DefaultColumnWidth("100") _ .GenerateCompactJSONResponse(False) _ .Width("100%") _ .Height("400px") _ .DataBind() _ .Render()) <p> <input type="submit" id="Save" value="Save" class="ui-button" />
Thanks in advance!
The sample I tested is in following location.
Grid->EditingAndSelection->BatchingUpdate -> MVC
a quick solution will be highly appreciated.
Thanks!
Hello pardeepkgupta,
Can you tell us which of our samples you tested or isolate and attach your sample for our review?
Thank you.
I tired this but still I am getting the same result. two transactions for added New Row and deleted the same.
In the above code, I updated the following line.
.DataSource(ViewData("Agreements")).AggregateTransactions(True) _
Hi,
You should enable this feature by setting the aggregateTransactions property to true.
AggregateTransactions is property of $.ig.DataSource that's why you don't see it in igGrid API.
Here is the description of aggregateTransactions property:
aggregateTransactions
Type:
bool
Default:
false
If set to true, the following behavior will take place:
if a new row is added, and then deleted, there will be no transaction added to the log
if an edit is made to a row or cell, then the value is brought back to its original value, the transaction should be removed.
Note: Keep in mind that if you update row and then delete it you will end up with two transactions.
Hope this helps,
Martin Pavlov
Infragistics, Inc.
More to add!!
In the Samples you provided with your product, I checked with BatchingUpdateController by putting break point and here also, there are two transactions for same row which was added and then deleted. but it must be 0 transactions as per Grid Net Transactions Feature you added in 2012 vol 1.
Please suggest if I miss something to implement this feature?