Is There any possible way to implement the custom validation with custom notification in ig-heirachial grid . I have a column with values .the last row is the total value . If i am changing the column value and the sum value of column if not matching with Toatal value Then the error notification should show to that Paricular toatal cell value as Total Volume not matched .Please see the attachment . I am using Infragistics 2015 version.
Hello sunil,
Thank you for posting in our forum.
You can apply custom validation logic by setting a custom validation function, for more details on the custom validation function please refer to:
http://www.igniteui.com/help/api/2016.1/ui.igvalidator#options:custom
And you can show a custom message by canceling the errorShowing event of the validator and manually creating and showing a igNotifier for the last row. I’ve attached an example for your reference where a value from the "2015" column is edited and validation fails a new igNotifier is created and shown on the last cell from the last column.
Please refer to the attached sample and let me know if you have any questions.
Best Regards,
Maya Kirova
Infragistics, Inc.
http://www.infragistics.com/support
Hi Maya,
Thanks for you quick reply .
I want if any cell value of particular Column is Changing(Here the month value from jan-dec) and the sum of jan-dec is not equal to the total value of the column .Then The notification will show for that Particular Total cell.But we will give chance to user so that they can change any of the cell value including total cell .When the sum will match to the total value of the cell then the notification should disappear automatically.Can we do like this ?
Thanks,
Sunil
Hello Sunil,
This is not possible to achieve via the grid’s configuration.
I suggest you handle the editCellEnded event of the Updating feature and manually create and show an igNotifier with the custom message based on your custom logic.
For example:
editCellEnded: function(e, ui){
if(ui.columnKey === "2015"){
//apply custom logic for checking if values are correct
//show notifier on last row
var lastCell = $("#grid > tbody > tr:last").find("td").eq(1);
if(lastCell.data("igNotifier")){
lastCell.data("igNotifier").show();
}else{
lastCell.igNotifier({
mode:"popover",
state: "error",
messages: {
error: "Total Volume not matched!"
}
});
return false;
Let me know if you have any questions.