<ej-grid id="FlatGrid" datasource="ViewBag.datasource" allow-paging="true" allow-row-drag-and-drop="true">@*enable drag and drop feature*@
@*row-drop-mappper : used to mapping server side action when rows are droped(routing path)*@
@*drop-target-id : mentioned the id of destination grid*@
<e-row-drop-settings row-drop-mappper="RowDropHandler" drop-target-id="#DestGrid"></e-row-drop-settings>
. . .
</ej-grid>
<ej-grid id="DestGrid" datasource="ViewBag.datasource2" allow-paging="true" allow-row-drag-and-drop="true">
<e-row-drop-settings row-drop-mappper="RowDropHandler" drop-target-id="#FlatGrid"></e-row-drop-settings>
. . .
</ej-grid>
[Controller]
public ActionResult RowDropHandler(List<EditableOrder> added, List<EditableOrder> deleted)
{
//To do here
} |
I just tried this, with the new .20 service pack. I get an error message
"The <e-row-drop-settings> tag is not allowed by parent <ej-grid> tag helper. Only child tags with name(s) 'e-columns, ej-grid, e-datamanager, e-page-settings, e-context-menu-settings, e-toolbar-settings, e-edit-settings, e-filter-settings, e-scroll-settings, e-search-settings, e-selection-settings, e-sort-settings, e-stacked-header-rows, e-summary-rows, e-text-wrap-settings' are allowed. "
I did notice that there's a "row-drop-settings" attribute showing in intellisense on the <ej-grid> itself.
This one's going to be a show-stopper - if I can't get this resolved, I'll have to go back to MVC.
<ej-grid id="FlatGrid" datasource="ViewBag.datasource" allow-paging="true" allow-row-drag-and-drop="true" load="onLoad">
. . .
</ej-grid>
<ej-grid id="FlatGrid" datasource="ViewBag.datasource" allow-paging="true" load="onLoad" allow-row-drag-and-drop="true">
. . .
</ej-grid>
[JS]
<script type="text/javascript">
function onLoad() {
var id = this._id == "FlatGrid" ? "#DestGrid" : "#FlatGrid"
this.model.rowDropSettings = { dropTargetID: id, rowDropMappper: "RowDropHandler" }
}
</script> |