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
Here's a validation function that I use in a production site.
function CheckFormsForErrors() { var grid = ig_controls["ctl00_ContentPlaceHolder1_WebHierarchicalDataGrid1"]; var totalrows = grid.get_rows().get_length(); if (totalrows == 0) { return true; } for (c = 0; c < totalrows; c++) { if (grid.get_rows().get_row(c).get_cell(7).get_value() == null || grid.get_rows().get_row(c).get_cell(7).get_value() == '') { formnum = grid.get_rows().get_row(c).get_cell(3).get_value(); errorstext += 'Form ' + formnum + ' press must be chosen. '; } } }
You would put a return false in place of the errorstext that I use.
Ed
Thanks for your answered.
I 'm programming a ultrawebgrid dynamically , and I need to specify what columns are required, only that columns I want to validate.
Thank you.