Hello, I am using a syncfusioin grid with the remote data adapter. and I am using add and edit features of the grid. when I add a row in a grid it always adding it first. I wanted to add it at bottom of the grid. how can I achieve this?
I have looked into below article and followed it. but it's not working for me
https://www.syncfusion.com/forums/131930/how-to-position-new-rows-at-the-bottom-of-the-grid
@(Html.EJ().Grid<AssignedProductMaterialViewModel>("GridProductMaterials")
.Datasource(datasource => datasource.Json((IEnumerable<AssignedProductMaterialViewModel>)Model.ProductMaterials).UpdateURL(@Url.Action("UpdateProductMaterial")).InsertURL(@Url.Action("CreateProductMaterial")).RemoveURL(@Url.Action("RemoveProductMaterial")).Adaptor(AdaptorType.RemoteSaveAdaptor))
.EditSettings(edit => { edit.AllowAdding().AllowEditing().AllowEditOnDblClick(false).EditMode(EditMode.InlineForm).ShowConfirmDialog(true).TitleColumn("Description"); })
.Query("new ej.Query().addParams('ProductId', " +Model.Id +")")
.ToolbarSettings(toolbar =>
{
toolbar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.Add);
});
})
.AllowResizing(true).AllowRowDragAndDrop(true).SelectionType(SelectionType.Single)
.EnableAltRow().AllowResizeToFit(true)
.EnableHeaderHover()
.Columns(col =>
{
col.Field(x => x.UnitQty)
.HeaderText("UnitQty")
.TextAlign(TextAlign.Center).EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0 })
.ValidationRules(v => v.AddRule("required", true).AddRule("maxlength", 255))
.Width(40)
.Add();
col.Field(x => x.Id)
.HeaderText("Id")
.TextAlign(TextAlign.Left).IsPrimaryKey(true).IsIdentity(true).AllowEditing(false).Visible(false)
.Width(100)
.Add();
col.Field(x => x.Description)
.HeaderText("Description")
.TextAlign(TextAlign.Center).EditType(EditingType.StringEdit)
.ValidationRules(v => v.AddRule("maxlength", 255))
.Width(110)
.Add();
col.Field(x => x.BeamLength)
.HeaderText("BeamLength")
.TextAlign(TextAlign.Center)
.EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0 })
.ValidationRules(v => v.AddRule("required", true).AddRule("maxlength", 255))
.Width(60)
.Add();
col.Field(x => x.SawDepth)
.HeaderText("SawDepth")
.TextAlign(TextAlign.Center)
.EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0 })
.ValidationRules(v => v.AddRule("required", true).AddRule("maxlength", 255))
.Width(50)
.Add();
col.Field(x => x.Thickness)
.HeaderText("Thickness")
.TextAlign(TextAlign.Center)
.EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0 })
.ValidationRules(v => v.AddRule("required", true).AddRule("maxlength", 255))
.Width(50)
.Add();
col.Field(x => x.Machine)
.HeaderText("Machine")
.TextAlign(TextAlign.Center).EditType(EditingType.StringEdit)
.ValidationRules(v => v.AddRule("maxlength", 255))
.Width(70)
.Add();
col.Field(x => x.Edge)
.HeaderText("Edge")
.TextAlign(TextAlign.Center)
.ValidationRules(v => v.AddRule("maxlength", 255))
.Width(40)
.Add();
col.Field(x => x.TapeThickness)
.HeaderText("TapeThickness")
.TextAlign(TextAlign.Center)
.EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0 })
.ValidationRules(v => v.AddRule("required", true).AddRule("maxlength", 255))
.Width(70)
.Add();
col.Field(x => x.WorkInstruction)
.HeaderText("WorkInstruction")
.TextAlign(TextAlign.Center).EditType(EditingType.StringEdit)
.ValidationRules(v => v.AddRule("maxlength", 255))
.Width(75)
.Add();
col.Field(x => x.FinishedLength)
.HeaderText("FinishedLength")
.TextAlign(TextAlign.Center)
.EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0 })
.ValidationRules(v => v.AddRule("required", true).AddRule("maxlength", 255))
.Width(75)
.Add();
col.Field(x => x.SizeDepth)
.HeaderText("SizeDepth")
.TextAlign(TextAlign.Center)
.EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 0 })
.ValidationRules(v => v.AddRule("required", true).AddRule("maxlength", 255))
.Width(60)
.Add();
col.HeaderText("Actions")
.Template(
"<a rel='nofollow' href='javascript:void(0)' data-productmaterial-id='{{:Id}}' class='btn-white btn btn-xs edit-data productmaterial-update-button'>Edit</a>  " +
"<a rel='nofollow' href='javascript:void(0)' data-productmaterial-id='{{:Id}}' class='btn-white btn btn-xs edit-data productmaterial-delete-button'>Delete</a>"
).AllowEditing(false)
.TextAlign(TextAlign.Center)
.Width(70).
Add();
})
.ClientSideEvents(events =>
{
events.ActionFailure("mrp.productDetails.productMaterialActionFailure");
events.ActionComplete("mrp.productDetails.productMaterialActionComplete");
events.RowDrop("mrp.productDetails.productMaterialsRowDrop");
})