Customized grid validations for errors and warning

Posted by: nchavan3 on 5 February 2021, 7:48 am EST

    • Post Options:
    • Link

    Posted 5 February 2021, 7:48 am EST - Updated 3 October 2022, 2:29 pm EST

    Hi All,

    We want to show grid validation error and warning with different icon for rowheader. Right now we are able to show only errors in rowheader with customized icon on it. How to show errors and warning for different rows in rowheader column with image and message on hover of icon? Is this achievable using getError property? Please suggest a solution.

  • Posted 8 February 2021, 3:34 am EST

    Hi,

    If my understanding is correct then you would like to show a Error message as a Tooltip when user hovers over the Row Header. If yes , then you need to use the CollectionView’s getError method to handle this.

    Please refer to the sample attachedCore_CollectionView_EditingViews_Validation_JavaScript (1).zip

    In case my understanding is not correct, please free to share additional details

  • Posted 11 February 2021, 11:00 am EST - Updated 3 October 2022, 2:29 pm EST

    Above understanding is not correct. Let me explain you briefly.

    Scenario 1 - We are showing cell error validations if condition is not matched and showing icon on row header with error message on icon hover. This is we already achieved using getError property of collectionView.

    Now,

    Scenario 2 - If we does not have row level errors, then we want to show warnings in rowHeader with warning icon and hover message on icon.

    Expected Result -

    If no error present at row level and warning is present for that row then we need to show warning icon in RowHeader.

    Questions -

    1. How to validated if row has no errors?
    2. what is the solution to achieved this scenarios?
    3. Is there any property in collectionView, so we can show warning if no error is present.
    4. Is there any way to find if grid row has errors?

  • Posted 12 February 2021, 6:38 am EST

    Hi Niraj,

    Please refer to the sample link below which fulfills your requirements:

    https://codesandbox.io/s/boring-resonance-reyo6

    You can use the formatItem event to add icons to the row headers. There is no direct method to check whether the grid has any error or not. For your requirements, you can check whether the wj-state-invalid CSS class is added to the cell element and add a warning/error icon accordingly.

    Regards,

    Ashwin

  • Posted 15 February 2021, 1:11 am EST

    Thanks Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels