jQWidgets Forums

jQuery UI Widgets Forums Grid problem with gris columns containing checkboxes

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 8 months ago.

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

  • Madhuri
    Participant

    I have a jqxgrid containing checkboxes in 3 columns as “Read”,”ReadHistory”,”Write”
    I want to enable Read when ReadHistory is enabled(on checking Readhistory Checkbox ,the Read checkbox should be checked at that very moment)
    also the grid being created is allowing to add rows at runtime.
    I did this using the below code in javascript:

    {text:  <js:string><fmt:message key="LBL_READ_HISTORY"/></js:string>, datafield:'readHistoryP', width:'100px', align:'center', editable:true,
                            initeditor:function(row, cellvalue, editor, celltext, pressedkey) {
                                if( $(this).attr("checked", true)){
                                        document.getElementById('DatadefNewReadFlagID').checked = true;
    
                                }
                            }
                        },
    

    After doing this as i click on ReadHistory,The Read checkbox is enabled but also the cell containing ReadHistory checkbox in that very row now displays html in background and the checkbox is vanished now. Please help me with the solution.


    Peter Stoev
    Keymaster

    Hi Madhuri,

    jqxCheckbox works with boolearn values. The value is passed in the initeditor function – cellvalue parameter. If you want to set the value of a given cell, use the setcellvalue method, but make sure that there’s no opened editor i.e you may do this inside “cellendedit” event, because in it, the editing is finished.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    Madhuri
    Participant

    image


    Madhuri
    Participant

    Hi Peter,

    Thankyou for such a quick reply.I am trying to find a fix for this.Can you please give me any link having setcellvalue method.

    Regards,


    Peter Stoev
    Keymaster

    Hi Madhuri,

    You can find an example about “setcellvalue” in the Grid’s API page.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.