Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
How to call server funtion from client and assign to Webdatagrid cell?
posted

Dear Sir/Madam,

I have a WebDataGrid having columns "TimeIn", "TimeOut", and "Duration" etc. When leaving the cell TimeOut the value in Duration should be auto populate.

Now when TimeOut exitedEditingMode, I need to pass the TimeIn and TimeOut value as parameter to a server function, in order to calculate the Duration and the rest(The Calculation is base on many conditions so need to be done in server side procedures). After getting a datatable from server, system need to assign back all the values to the cell.

I'm not sure how to call the server function in the ExitedEditingMode javascipt. Please advise. Thanks a lot.

function grd_MHC_ExitedEditMode(sender, e) {

var cellKey = e.getCell().get_column().get_key();

if (cellKey == "TimeOut")

{

var TimeInCellText = e.getCell().get_row().get_cellByColumnKey("TimeIn").get_value();

var TimeOutCellText = e.get_Editor().get_currentValue();

var cellToUpdate = e.getCell().get_row().get_cellByColumnKey("Duration");

.....

}

}

Parents Reply Children