GetErrors in collectionView

Posted by: mehrotra-deeprndra on 14 September 2017, 12:03 pm EST

    • Post Options:
    • Link

    Posted 14 September 2017, 12:03 pm EST

    I am using collectionView to bind data to flex grid Angular2 , I have business requirement to do validation on grid cell.

    CollectionView.getError call back function does not tells exactly if there are any errors are not, What I want to know is how to find out if collectionView has any errors or not ?

  • Posted 14 September 2017, 12:03 pm EST

    Hi,

    CollectionView’s getError method is used for setting validation condition for CollectionView data and can show error in FlexGrid based on condition.

    Please refer to the following demo sample that implements the same:

    http://demos.wijmo.com/5/Angular/GridValidation/GridValidation/

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 12:03 pm EST

    But my scenario is to disable/enable button if there are any errors on collection View . I did not find any property which returns saying CollectionView has error or not ?

  • Posted 14 September 2017, 12:03 pm EST

    Hi,

    We are sorry, there is no properties or method for this. You need to check manually on FlexGrid initialized event.

    You can get cell data using getCellData() method.

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 12:03 pm EST

    I could not find much information on how to achieve this , can you please provide code sample ?

  • Posted 14 September 2017, 12:03 pm EST

    Hello,

    Please find the attached sample that set the font color to red for a cell with an error with itemFormatter.

    You can check error in the same way in initialized event if you would like to verify the collectionView only once.

    Thanks,

    Manish Kumar Gupta

    2017/06/FlexGrid_showError_itemFormatter.zip

Need extra support?

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

Learn More

Forum Channels