jQWidgets Forums
Forum Replies Created
-
Author
-
HI Peter:
I have tried the selectCell method. This method need 3 paramaters, the first one is date, now return to the first question, I can’t get the cell, so I don’t know the date.
I suggest that when the contextmenu opened, the cell can be passed to the open method.Best Regards
Thanks for you reply.
But your method didn’t work still.
My code is:
contextMenuItemClick: function (menu, appointment, event)
{
var args = event.args;
var selection = $(‘#scheduler’).jqxScheduler(‘getSelection’);
alert(selection);
var id = args.id;
if(id == “del”){
deleteProcess(appointment);
}
if(id == “upd”){
updateProcess(appointment);
}
if(id == “add”){
addProcess();
}
},
contextMenuOpen: function (menu, appointment, event) {
$(‘#scheduler’).jqxScheduler(‘clearSelection’)
var selection = $(‘#scheduler’).jqxScheduler(‘getSelection’);
alert(selection);
if (!appointment) {
menu.jqxMenu(‘hideItem’, ‘del’);
menu.jqxMenu(‘hideItem’, ‘upd’);
menu.jqxMenu(‘showItem’, ‘add’);
}
else {
menu.jqxMenu(‘showItem’, ‘del’);
menu.jqxMenu(‘showItem’, ‘upd’);
menu.jqxMenu(‘hideItem’, ‘add’);
}
},
in contextMenuOpen event. I clear the selection. But in contextMenuItemClick getSelection is null.Thanks Peter, but it works only at the first time. For example, cell a and cell b, the first time i right click cell a, the contextmenu open, and the cell a is selected, but when i right click cell b, the selected cell is still cell a. How can the selected cell change to b.
January 14, 2016 at 8:30 am in reply to: Appointment content shows in cell Appointment content shows in cell #80392And how to refresh the scheduler’s data.
Thanks, but in this demo, it shows how to add buttons, I want to remove or hide the default buttons.Just like hide the delete button.
-
AuthorPosts