We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeGrid: values in new record

Thread ID:

Created:

Updated:

Platform:

Replies:

125342 Aug 10,2016 04:16 AM UTC Aug 11,2016 07:22 AM UTC ASP.NET MVC 1
loading
Tags: TreeGrid
Lev Kadisov
Asked On August 10, 2016 04:16 AM UTC

Hi,
I have a editable TreeGrid version 14.2.0.26.
When I add a new record, I want to set the values in the new row, like a parent Id or like a sequential number.
Is it possibile? thanks

A solution exists for Grid as in https://www.syncfusion.com/forums/123345/editable-grid-values-in-new-record
But actionBegin event is not called for TreeGrid.

@(Html.EJ().TreeGrid("Editing")
        .Datasource(ds => ds.Json((IEnumerable<MyObject>)ViewBag.dataSource).UpdateURL("ObjectsUpdate").InsertURL("ObjectsInsert").RemoveURL("ObjectsDelete").Adaptor(AdaptorType.RemoteSaveAdaptor))
        .EnableResize()
        .ShowColumnChooser(true)
        .AllowSorting(true)
        .EditSettings(edit => {
            edit.AllowAdding().AllowDeleting().AllowEditing();
            edit.EditMode(TreeGridEditMode.CellEditing);
            edit.RowPosition(TreeGridRowPosition.Child);
        })
        .ToolbarSettings(toolbar =>
        {
            toolbar.ShowToolbar().ToolbarItems(new List<TreeGridToolBarItems>()
            {
                TreeGridToolBarItems.Add,
                TreeGridToolBarItems.Edit,
                TreeGridToolBarItems.Delete,
                TreeGridToolBarItems.Update,
                TreeGridToolBarItems.Cancel,
                TreeGridToolBarItems.ExpandAll,
                TreeGridToolBarItems.CollapseAll
            });
        })
        .ChildMapping("Children")
        .TreeColumnIndex(1)
        .Columns(col =>
        {
            col.Field("Id").HeaderText("ID объекта").AllowEditing(false).EditType(TreeGridEditingType.Numeric).Width(90).Add();
            col.Field("Name").HeaderText("Наименование").Width(270).EditType(TreeGridEditingType.String).Add();
            col.Field("IdParent").HeaderText("ID родительского объекта").AllowEditing(false).EditType(TreeGridEditingType.Numeric).Width(90).Add();
            col.Field("SortOrder").HeaderText("Порядок сортировки").EditType(TreeGridEditingType.Numeric).Width(90).Add();
        })
        .IsResponsive(true)
        .ClientSideEvents(eve => {
            eve.ActionBegin("actionBegin");
            eve.RowSelecting("rowSelecting");
            eve.EndEdit("endEdit");
        })
    )

Lev

Jonesherine Stephen [Syncfusion]
Replied On August 11, 2016 07:22 AM UTC

Hi Lev, 
At present there is no support to trigger the actionBegin client side event while adding new row. For this we have already logged a feature request regarding this. 
A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates. 
Please let us know if you require further assistance on this.
Regards,             
 
Jone sherine P S   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;