jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Validation – at the time of calling 'addrow'

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Keshavan
    Participant

    Hi,

    I am calling ‘addrow’ method with all the column values for the row, at the time of inserting the blank / new row itself in the Grid.
    I am checking for duplicate rows in the server side code, it prevents duplicate records in to DB.

    While it’s working fine, i want to prevent duplicate rows in Grid by checking for specific column values (as all column values
    are available to me at the time of calling ‘addrow’ method ). As of now i need to refresh the grid to remove duplicate rows.

    I want to check if say (column 1 + column 2) values are already available in the GRID, and if so prevent adding new row.

    I thought of having all grid rows in an array and check in that beforeo calling ‘addrow’.

    Please let me know if there is a better way of doing that and sample code if any.

    Thanks,

    Keshavan


    Peter Stoev
    Keymaster

    Hi Keshavan,

    That is something which you should do in your application. “addrow” is not supposed to check for duplicates by default. If you wish, you can get the Grid’s rows using the “getrows” method and make your comparison before calling “addrow”.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.