This question is locked. New answers and comments are not allowed.
Hi Telerik Team,
I need to hide the "add new record" button when a condition is fulfilled. I'm trying to accomplish this using jquery on onDataBound event as this is the last event fired before the grid is rendered as described in (http://demos.telerik.com/aspnet-mvc/grid/clientsideevents).
This are my functions:
Please let me know where am I doing wrong as it is not hiding the button/updating the css.
Thank you
I need to hide the "add new record" button when a condition is fulfilled. I'm trying to accomplish this using jquery on onDataBound event as this is the last event fired before the grid is rendered as described in (http://demos.telerik.com/aspnet-mvc/grid/clientsideevents).
This are my functions:
var totalPercentage = 0; function onSaveJobList(e){ //clear the total Percentage for add/edit totalPercentage = 0; } function onRowDataBoundJobList(e){ totalPercentage = totalPercentage + e.dataItem["PERCENTAGE"]; } function onDataBoundJobList(e){ debugger $("#TOTAL_SPLITED").attr('value', ($("#TO_INVOICE_AMOUNT").val() * totalPercentage/100).toFixed(2)); if(totalPercentage == 100){ //$(".t-toolbar", $(this)).css("visibility:hidden"); $(".t-toolbar", $(this)).css("display:none"); } else{ $(".t-toolbar", $(this)).css("visibility:visible"); } }Please let me know where am I doing wrong as it is not hiding the button/updating the css.
Thank you
