Validation Message when deleting a row in a data grid


Article Number000079720
EnvironmentProduct: Rollbase
Version: All supported versions
Question/Problem Description

Is there a possible way to give some validation messages when trying to delete a record/row in a grid through client JS?

Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
A solution using Javascript:

$(function() {

//Add handler to all delete links

$('[id*="rbi_gridTable"]').each(function(index, element) { //Look through all grids and override the existing delete links in the page

       $(this).find('.actionCol').each(function(index, element) { //actionCol element holds the delete link element

       	var delLink = $(this).find('a').first();

if (delLink.length > 0) overrideDelete( delLink );




function onCreate(gridNo,gridRow) { //appended to the oncreate of the grid to override the link when a row is created

overrideDelete( $('#rbi_gridRow_'+gridNo+'_'+gridRow+' .actionCol').first().find('a').first() );


function overrideDelete(element) {

var clonedElement = $(element).clone(); //Clone the delete element to retain the onclick, needed if confirmation is true

$(element).attr('onClick','').on('click', function(){ //remove onclick of the original element and append your own

var x = confirm('Are you sure you want to delete this row?'); //check if the person really wants to delete the row

if (x); //delete if he does




Required: - add onCreate(##,@@); to grid control's onCreate property.
Last Modified Date3/22/2017 8:46 AM

The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.

Was this article helpful?


Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025