bogdanm

Forum Replies Created

Viewing 9 replies - 16 through 24 (of 24 total)
  • Author
    Replies
  • bogdanm
    Participant

    Hmm…, how do I paste code here? I tried the “code” in square brackets tags but they don’t work.

    • This reply was modified 4 years, 1 month ago by bogdanm.
    bogdanm
    Participant

    I mentioned the “detail” example in the demo because I also have a page with 2 grids, but in my case the second grid does not need any rowid from the first grid.

     

    I just need to refresh the second grid every time I add (or edit, delete) a row in the first grid.

    Here is the code that I use:

    The <body> section of the html file (actually it’s a .php file):

    In cashron-grid1.php I have:

    The purpose is to refresh the grid in cashron-grid2.php every time I add/edit/delete in cashron-grid1.php.

    Grid2 does not need a rowid from the changed row in grid1. It just calculates some totals, but with different WHERE statements in the SQL query.

    • This reply was modified 4 years, 1 month ago by bogdanm.
    bogdanm
    Participant

    I use formedit.

    bogdanm
    Participant

    I want to achieve something similar to your demo at:

    http://www.guriddo.net/demo/demos/jqgrid/

    in “Selection” -> “Master detail on select”.

     

    There the “detail” grid gets refreshed every time a row is selected in the grid above.

    What I need is the same refresh of the “detail” grid (in my case it’s called “balances”), only I need it to happen when a row is added or edited or deleted in the first grid.

    The event “afterSubmit” does not seem to work for me. If I replace it with “onRowSelect”, it works on selects, so all the other code is correct, it’s just the event that needs to be changed, and I don’t know which is the correct one.

    in reply to: Buttons disappear after loading grid state #125426
    bogdanm
    Participant

    Thanks, it worked!

    in reply to: Buttons disappear after loading grid state #125420
    bogdanm
    Participant

    Sorry for not seeing the related information in that thread.

     

    So, the code you posted in that thread is for jqGrid JS:

     

     

    For PHP it is like this?

     

    $grid->storeNavOptions = true;

     

    Does it matter the position in the code for this line? Can I put it right after:

     

    • This reply was modified 4 years, 3 months ago by bogdanm.
    • This reply was modified 4 years, 3 months ago by bogdanm.
    in reply to: What event triggers after inserting a new DB entry? #124878
    bogdanm
    Participant

    Thanks, it worked!

     

    Also, can you tell me if there’s an easy way to make the grey background (behind the add and edit panels) only cover the grid that is being added or edited? Right now it covers the entire page, including my second grid. (should I create a different thread for this?)

    in reply to: What event triggers after inserting a new DB entry? #124871
    bogdanm
    Participant

    I am displaying a second grid below the main one. The second grid show entries that were added that day and I need to use an event in the main grid to trigger a refresh of the second grid.

    So in the main grid I tried to use the following:

    $refreshtoday = <<<ENDTODAY
    function()
    {
    jQuery(“#detail”).trigger(“reloadGrid”);
    }
    ENDTODAY;
    $grid->setGridEvent(‘afterInsertRow’, $refreshtoday);

    But the above triggers the refresh for every row the main grid displays (so if I have 20 rows per page, the event triggers 20 times). I wanted to trigger only when a new row is added (via the add panel).

     

    • This reply was modified 4 years, 8 months ago by bogdanm.
    in reply to: Datepicker customization #124682
    bogdanm
    Participant

    Thank you for the info.

     

    For anyone having the same problem, here is how to do it:

    $grid->setDatepicker(‘mycolumn’, array(“firstDay”=>”1”));

Viewing 9 replies - 16 through 24 (of 24 total)

Stay connected with us in your favorite flavor!