Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rpcosta

Pages: [1]
1
ParamQuery Pro Evaluation Support / numberCell class
« on: March 23, 2016, 11:26:38 pm »
Hello,
Is there a way to add/remove numberCell's classes for a particular row in the same way you can add/remove classes for a particular data cell?

2
ParamQuery Pro Evaluation Support / column validation unique select
« on: March 03, 2016, 09:29:33 pm »
Hello everyone,
I'm trying to create a function for validation of a select columns to prevent the user from selecting options that have already been selected in other rows. I've managed to get it to work for new rows using getData. But if I edit a row and don't change it this doesn't work as the getData returns the values of all rows (including the one I'm editing) and as so detects the value is already being used and won't save.
Is there a way to get the data from all the rows except the one I'm editing? Or get number of the row I'm editing so I can exclude it from the array that getData returns?
I'll leave my code below so you can take a look.

Thanks in advance.

Code: [Select]
validations: [
{ type: function (ui) {
var value = ui.value;
var values = $grid.pqGrid("getData", { dataIndx: [ui.column.dataIndx] } );

for (i = 0; i < values.length; i++) {
if(values[i][ui.column.dataIndx] == value) {
  ui.msg = "Duplicate entry";
return false;
}
}
}
}
]

Pages: [1]