Hi,
Anybody can help me how to make drag and drop cell inside grid view? I would like to publish my sample code. I appricate any help or any tutorial.
Script.
function AssignDragandDrop() {
$telerik.$('.RmEmtpyRoom').each(function () {
$telerik.$(this).droppable({ drop: celldrop });
});
$telerik.$('.RmReservation').each(function () {
$telerik.$(this).draggable({ helper: 'clone' });
});
}
function celldrop(e, a) {
//var oWnd = radopen(null, "winMove");
var targetCell = $telerik.$(this);
var targetCellIndex = targetCell.context.cellIndex;
var targetRow = targetCell.context.parentElement;
var targetRowIndex = targetRow.rowIndex;
var newdate = $find('<%=grdAvailability.ClientID%>').MasterTableView.get_columns()[targetCellIndex].get_uniqueName();
var roomkey = $find('<%=grdAvailability.ClientID%>').MasterTableView.get_dataItems()[targetRowIndex].getDataKeyValue("RoomKey");
var reservationkey = a.draggable.context.id.split('_')[1];
var url = '../Reservation/Update/NewMoveReservation.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey;
ShowRadWindow('Move Reservation', url, 650, 650);
//var oWnd = radopen('../Reservation/Update/NewMoveReservation.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey, "winMove");
//var oWnd = radopen('../Reservation/Test.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey, "winMove");
}
Anybody can help me how to make drag and drop cell inside grid view? I would like to publish my sample code. I appricate any help or any tutorial.
Script.
function AssignDragandDrop() {
$telerik.$('.RmEmtpyRoom').each(function () {
$telerik.$(this).droppable({ drop: celldrop });
});
$telerik.$('.RmReservation').each(function () {
$telerik.$(this).draggable({ helper: 'clone' });
});
}
function celldrop(e, a) {
//var oWnd = radopen(null, "winMove");
var targetCell = $telerik.$(this);
var targetCellIndex = targetCell.context.cellIndex;
var targetRow = targetCell.context.parentElement;
var targetRowIndex = targetRow.rowIndex;
var newdate = $find('<%=grdAvailability.ClientID%>').MasterTableView.get_columns()[targetCellIndex].get_uniqueName();
var roomkey = $find('<%=grdAvailability.ClientID%>').MasterTableView.get_dataItems()[targetRowIndex].getDataKeyValue("RoomKey");
var reservationkey = a.draggable.context.id.split('_')[1];
var url = '../Reservation/Update/NewMoveReservation.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey;
ShowRadWindow('Move Reservation', url, 650, 650);
//var oWnd = radopen('../Reservation/Update/NewMoveReservation.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey, "winMove");
//var oWnd = radopen('../Reservation/Test.aspx?RK=' + reservationkey + '&D=' + newdate + '&R=' + roomkey, "winMove");
}