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
140
How Can I validate cells?
posted

Hi,

I want to validate some cells in a ultrawebgrid in the client side, how can I do that?.

I tried the follow code, but it validates all ultrawebgrid's cells

function grdPrincipal_BeforeExitEditModeHandler(gridName, cellId, newValue) {
var cell = igtbl_getCellById(cellId);
var grid = igtbl_getGridById(gridName);
var currentValue = cell.getValue();
if (newValue == null || newValue == '') {
alert('');
EditCell();
return 1;
}
} 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Can you help me please.

Thanks

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Parents
No Data
Reply
  • 45049
    Suggested Answer
    posted

    You already have a reference to the cell that was edited, based on the following line:

    torresann said:
    var cell = igtbl_getCellById(cellId);
    From here, look at the value of "cell.Column.Key" to determine which column you're in.  If this returns the key of the column whose cells you want to validate, proceed with validation as appropriate for that column.

Children