cchmatthew

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • in reply to: why i get html by getRowData #92528
    cchmatthew
    Participant

    What we did is we took the editRow(…) call from the “onRowSelect” event. Instead we now have to click on a button to edit the row.

    By taking the editRow out of the event and making it explicit that you have to click the button to edit the row, when you call getRowData(…) it will actually return the value of the field, rather than the html of the input box.

    the idea is that when you call getRowData the field is in fact not editable. However you have edited it before so the edited data is there.

    Here's the code we used:

    colModel :[

    in reply to: why i get html by getRowData #92521
    cchmatthew
    Participant

    Okay, we've come across a solution.

    The problem is when the editable field of the column is set to true, the *value* of the cell changes to html, because it's now editable.

    ie wheras before you might have had column “Age”:”16″,

    when it is being edited, the value “16” changes to , and this is what is pulled out by getRowData(…).

    if you're not sure what i mean, switch the column property editable:true -> editable:false and then call getRowData(…) you'll see the actual value pop up.

    this frustrated me for about 3 hours this afternoon, someone only just pointed out to me what was up 😀

    from here i'm going to try to figure out how to use jquery/jqgrid to change the editable property of the field to false before i call getRowData

    in reply to: why i get html by getRowData #92520
    cchmatthew
    Participant

    Hi,

Viewing 3 replies - 1 through 3 (of 3 total)

Stay connected with us in your favorite flavor!