Inline editing vs Inline form editing

Hi,

I would like to use inline editing for the update action and inline form/inline template for add option.

for update I would like to use the code
.EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing(); })

for add I would like to use the code
.EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.InlineFormTemplate).InlineFormTemplateID("#template");  })

Is there any way? Please help.

Thanks in advance.

kind regards,
Shanzida



1 Reply

KN Kavitha Narayanan Syncfusion Team February 26, 2016 11:43 AM UTC

Hi Shanzida,

Thanks for contacting Syncfusion support.

Query: I would like to use inline editing for the update action and inline form/inline template for add option.

Use Toolbar for update and add option:

We use OnToolbarClickEvent client side event for normal editing to update action and inline form for add option with the help of below code.

ClientSideEvents(eve=>eve.OnToolbarClickEvent("toolBarEvent").OnRecordDoubleClickEvent("recordClick").OnActionSuccess("sucess"))

function toolBarEvent(sender,args)

    {

        if ($(args._currentItem).find(".EditItem").length > 0) {

            sender._editMode = "Normal"; //set normal edit

        }

        if($(args._currentItem).find(".AddNewItem").length > 0)

            sender._editMode = "InlineForm"; //set inlineform edit
    }

When double click on the row:

We use “OnRecordDoubleClickEvent” event for normal editing to update action when double click the row.

Please refer to the code and sample:

[code]

.ClientSideEvents(eve=>eve.OnToolbarClickEvent("toolBarEvent").OnRecordDoubleClickEvent("recordClick").OnActionSuccess("sucess"))

  function recordClick(sender, args)

    {

        sender._editMode = "Normal"; //set normal edit on double click on the row
    }

Sample: http://www.syncfusion.com/downloads/support/forum/123201/ze/sample1155919959.zip

Regards,
Kavitha N.


Loader.
Up arrow icon