Refresh only modal after edit?

(13 posts) (2 voices)


No tags yet.

  1. spyhunter88, Member


    I am trying to edit an Entity from a List by form and I need to update the list after add/edit/delete an Entity. It's easy when the List is a Windows, but hard when it is a popup. I found some javascript to modify the source list by hiddendiv but is there any simple method to do that?

    Also, when I edit an Entity by a form, can it show parameter with disable or readonly because I want to show this info but not allow user to edit this.


  2. myDBR Team, Key Master

    it would be easier to answer if we saw the code / report code. You are attaching editing functionality to a popup element and after the edit do some modification for the popup content?

    As for the readonly parameters, see documentation and look for the "*=" syntax.

    myDBR Team

  3. spyhunter88, Member

    Thanks for '*=' syntax.

    Yes, I attack editing function to a popup, "some modification" exactly refresh whole popup list to see new line, edited cell ...

    Now, I place the code select 'dbr.text', 'Please reload to update!'; to alert user to reload the popup (have List) from main report.

    Apart of my popup code:
    select '', 'sp_DBR_update_Tax_Code', 'Tax_Code', 'inID=ID', 'inTaxCode*=Tax_Code' , 'inNote<=Note';

    select ID, Tax_Code from TaxCode where CustName like concat('%', inCustName, '%');
    And my Edit report:
    CREATE STORE PROCEDURE sp_DBR_update_Tax_Code(inID int, inTaxCode varchar(30), inNote varchar(255) BEGIN update TaxCode set Note = inNote where ID = inID; END

    I see "callbefore" option, is there anything like "callafter" option comes with reload only popup report?

  4. myDBR Team, Key Master

    the linked repot can return JavaScript which you can use to edit the report content after the linked in report is called.

    In your case, when your edit report is just updating one field (Note), you might want to consider using dbr.editable instead of The editing is easier for the user and you do not need to refresh the page after the editing.

    myDBR Team

  5. spyhunter88, Member


    I know that, but I have too much field to update in one time with an add new Line. Which demo javascript for add new line of item to list?

  6. myDBR Team, Key Master

    Could you please rephrase the question. Did not quite understand that.

    Are you creating new items or edit existing ones?

    myDBR Team

  7. spyhunter88, Member

    Sorry, I'm so busy with another projest in the last week. I dont edit existing line.

    My popup report has a list and a button, each row has a button to delete this row by linked-report (like the Editable report demo), a button to create new line by using linked-report and show an input form when click.

    And, after the delete/add report is done, now I only alert by an information and tell user to reload manual.

    My question is how can I take 'dbr.refresh' for only popup? So I can auto refresh after User delete/add one line. I think that's the normal request from many situation.

  8. myDBR Team, Key Master

    When you only edit (add / delete) single lined, it is better to use JavaScript to modify the rows as refresh causes user to lose the scrolling position / sorting order that (s)he may have chosen.

    myDBR Team

  9. spyhunter88, Member


    I tried this way. I add an empty row in the last, when user Edit this row by using 'dbr.editable', the update report will check for ID and if this ID = 0 means add new row. Is there any other way to add a new line?

    And, how can I check for require field?


  10. myDBR Team, Key Master

    Another way of dealing with new creation is to use and return the JavaScript to insert the row to the table.

    myDBR Team

  11. spyhunter88, Member

    Thanks, I found the delete javascript and easy apply it to my report. That's:
    select 'dbr.javascript', "$(mydbr_selected_cell).parent().remove();";

    Also I can make it work when Edit by update cell, using:
    select 'dbr.javascript', "$(mydbr_selected_cell).parent().children().eq(0).text(1234321);";

    but with Add function, I use a "Add" button with "" to create new Line. But how can I add new row and update all value in this row from linked-report like I did when delete/edit? Cause "mydbr_selected_cell" is nothing.

    And, how can I set the linked column, or Delete icon in the last column if my linked report like below:
    select '', 'sp_DBR_inTaxCode_inCustCode', 'new_popup', '[Tax_Code]', 'inTaxCode*=[Tax_Code]', 'toDate=(inDate)', '"AR by TaxCode"'; select '', 'sp_DBR_update_Note', 'new_popup', '[Tax_Code]', 'inID=ID', 'inTaxCode*=Tax_Code', 'inDate<=(inDate)', 'inNote<=Note', 'inAction=""'; select '', 'sp_DBR_update_Note', 'new_popup', '[del]', 'inID=ID', 'inTaxCode*=Tax_Code', 'inDate<=(inDate)', 'inNote=Note', 'inAction="Delete"', 'event=click', 'callbefore=confirmdel', '"Delete Note"';

  12. spyhunter88, Member

    But this script $(mydbr_selected_cell) does not work if the list is in a Popup, it take the cell of main report, not the cell in popup report.

    So any other ways to make this work with list in popup?

  13. myDBR Team, Key Master

    But this script $(mydbr_selected_cell) does not work if the list is in a Popup, it take the cell of main report, not the cell in popup report.

    Could you please contact support with a full example. This way it would be easier to understand what the problem is.

    myDBR Team


You must log in to post.