jQuery UI Widgets Forums Grid Issue with 'deleterow' method of Grid in ver. 2.8

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 5 months ago.

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

  • Keshavan
    Participant

    Hi,

    Issue with ‘deleterow’ method of Grid – to delete rows from Grid Only, while implementing Shopping cart.

    *********
    * jQWidgets v2.8.0 Release, Mar-22-2013
    *********

    I have 3 rows in Grid, the ‘rowindex’ of the 3 rows are 0,1 and 2 respectively as GOT from ‘getselectedrowindex’ method.
    I used the ‘getrowid’ method and the rowid’s are 0,1 and 2 respectively for the corresponding rowindexes.

    Test Scenario.

    a. I delete the first row and then add the same row as the last row in the Grid.

    b. I checked and the corresponding ‘rowindex’ values, (using ‘getselectedrowindex’ method)

    for the latest data in Grid (after ‘a’ above),

    the ‘rowindex’ values were 0, 1 and 2 for the 1st three rows , the corresponding ‘rowid’ values were, 1, 2 and 2. (using ‘getrowid’ method)

    c. the code i have used to fetch rowid and delete from grid is,

    {

    selectedRowIndex = $(‘#productGrid’).jqxGrid(‘getselectedrowindex’);
    var data = $(‘#productGrid’).jqxGrid(‘getrowdata’, selectedRowIndex);
    var id1 = data.uid;
    if (data.ProductDesc == desc) {
    $(‘#productGrid’).jqxGrid(‘deleterow’, id1);

    }

    d. Now, when i delete 2nd item in the Grid, the 3rd row in the Grid gets deleted, as it also has the same ‘rowid’.

    Please help, as i am implementing a shopping cart and the user would add / remove items in a random fashion.


    Dimitar
    Participant

    Hello Keshavan,

    Please update to the latest version of jQWidgets (3.0.2) and share your experience.

    Best Regards,
    Dimitar

    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.