user canceled editing - how to get this event?
when the user started editing - I showed additional columns.
after editing - I want to hide the additional columns.
SIGN IN To post a reply.
3 Replies
BM
Bharath Marimuthu
Syncfusion Team
December 13, 2016 11:52 AM UTC
Hi Razgovorov,
Thanks for contacting Syncfusion support.
By using “beginEdit” and “endEdit” client side events and “showColumn”,”hideColumn” public methods we can show/hide additional columns, please find the code snippet below.
|
$("#TreeGridContainer").ejTreeGrid({
//…
beginEdit: beginEdit,
endEdit: endEdit,
}
function beginEdit(args) {
this.showColumn("End Date");
}
function endEdit(args) {
this.hideColumn("End Date");
} |
We have prepared the sample for this, in this sample we have shown/hide columns on editing actions.
Please find the sample from below mentioned location.
Sample: http://www.syncfusion.com/downloads/support/forum/127830/ze/TreeGrid_Dynamic_Columns-1384519402
Thanks,
Bharath.
RM
Razgovorov Mikhail
December 13, 2016 03:50 PM UTC
If you press the ESC key or cancel editing on toolbar - event did not come. and in your example too
thanks for the answer.
thanks for the answer.
JS
Jonesherine Stephen
Syncfusion Team
December 14, 2016 12:29 PM UTC
Hi Razgovorov,
At present there is no support for any client side events while canceling the edit action in TreeGrid. But we can show/hide the particular column on toolbar cancel click action by using “toolbarClick” event. And by using the jquery keydown action we can hide the column on esc key navigation.
Please find the code example below:
|
$("#TreeGridContainer").ejTreeGrid({
toolbarClick:toolbarclick,
});
function toolbarclick(args) {
if(args.itemName=="Cancel" || args.itemName=="ExpandAll" || args.itemName=="CollapseAll")
{
this.hideColumn("End Date");
}
}
$(document).keydown(function (e) {
//To hide the column on esc key navigation
if (e.keyCode === 27) {
var treeObj = $("#TreeGridContainer").data("ejTreeGrid");
treeObj.hideColumn("End Date");
}
|
We have also prepared the sample based on this. Please find the sample from below location
Regards,
Jone sherine P S
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
RM Razgovorov Mikhail
- Dec 12, 2016 11:32 AM UTC
- Dec 14, 2016 12:29 PM UTC