I have the next simplified version of source code:
@using (Html.BeginForm("MyAction", "MyController", FormMethod.Post, new { id = "MyForm" })){
<fieldset> <input id="MyTransactions" type="hidden" name="MyTransactions" value="" /> </fieldset>
<div> @(Html.Infragistics().Grid(Model.MyModel.AsQueryable()) .ID("MyGrid") .AutoCommit(false) .AutoGenerateColumns(true) .AutoGenerateLayouts(true) .AggregateTransactions(true) .PrimaryKey("Id") .Columns(pColumn => { pColumn.For(p => p.Id).Hidden(true); pColumn.For(p => p.Version).Hidden(true); // I NEED THIS WHEN ROW IS DELETED! pColumn.For(p => p.Name).HeaderText("Name"); }) .Features(pFeatures => { pFeatures.Updating() .EnableAddRow(true) .EnableDeleteRow(true) .EditMode(GridEditMode.Row) }) .DataBind() .Render() ) </div> <div> <input type="button" id="saveChanges" value="Save" class="button" /> </div>}
<script> $("#saveChanges").bind({ click: function (e) { var trans = JSON.stringify($("#MyGrid").igGrid("allTransactions")); document.getElementById("MyTransactions").value = trans; // Save in "MyTransactions". document.getElementById("MyForm").submit(); } });</script>
When a row is deleted the transactions are, for example:
"[{\"type\":\"deleterow\",\"tid\":\"c9e3\",\"rowId\":34}]"
As you can see, except for rowId there is no data for the other cells. I need the Version of the deleted row, how to do that?
Hello Luis,
If I can provide further help regarding this matter please let me know.
Sincerely,
Tsanna