Mar 10, 2014, 8:51 PM
[CLOSED] RowExpander click also puts row into edit mode using RowEditing plugin
I am having a problem with an application that uses RowEditing and RowExpander together
I have included other posts suggestions - but am still having problems.
I'm created an example using GridPanel=>Update=>Restful as a base
I am editing the rows inline using RowEditing plugin
I added another plugin RowExpander to trigger the display of history for the row.
Clicking once on one of the row fields correctly puts the row into edit mode; set ClicksToEdit(1)
Clicking once on the "+" for expander row opens the row
1) Problem - even though ExpandOnDblClick(true) - expands on single click
2) Row goes into edit mode and expander displays history
3) Expander hides the [Update][Cancel] buttons
I also added a command column to trigger editing along with clicking the row
1) command column does not react to a single click
2) clicking on it twice puts it into "expand" mode instead of edit mode
I have tried several variations on this combination but the two plugins seemed linked.
I think I need these two items addressed:
1) Having the command column take one click to go into edit mode
2) Prevent the row going into edit mode when the "+" for the row expander has been pressed.
I've attached the controller and cshtml file
The important snips are:
I have included other posts suggestions - but am still having problems.
I'm created an example using GridPanel=>Update=>Restful as a base
I am editing the rows inline using RowEditing plugin
I added another plugin RowExpander to trigger the display of history for the row.
Clicking once on one of the row fields correctly puts the row into edit mode; set ClicksToEdit(1)
Clicking once on the "+" for expander row opens the row
1) Problem - even though ExpandOnDblClick(true) - expands on single click
2) Row goes into edit mode and expander displays history
3) Expander hides the [Update][Cancel] buttons
I also added a command column to trigger editing along with clicking the row
1) command column does not react to a single click
2) clicking on it twice puts it into "expand" mode instead of edit mode
I have tried several variations on this combination but the two plugins seemed linked.
I think I need these two items addressed:
1) Having the command column take one click to go into edit mode
2) Prevent the row going into edit mode when the "+" for the row expander has been pressed.
I've attached the controller and cshtml file
The important snips are:
.ColumnModel(Html.X().CommandColumn().Commands(c => c.Add(Html.X().GridCommand().CommandName("edit").Icon(Icon.Pencil)))
.Listeners(listener => { listener.Command.Handler = "commandHandler(edit, record);"; }),
.Plugins(
Html.X().RowExpander().ID("reHistory").ExpandOnDblClick(true)
.Loader(Html.X().ComponentLoader()
.Url(Url.Action("GetTestPersonTestHistory"))
.Mode(LoadMode.Component)
.LoadMask(mask => mask.ShowMask = true)
.Params(new { id = JRawValue.From("this.record.data.Id") })
)
,
Html.X().RowEditing().ClicksToEdit(1).ClicksToMoveEditor(1)
.Listeners(l => {
l.CancelEdit.Handler = "if(e.record.phantom){e.store.remove(e.record);}";
})
)
Thanks! Cyndi Pruett
Last edited by Daniil; Mar 14, 2014 at 8:25 AM.
Reason: Please use [CODE] tags, [CLOSED]