jQWidgets Forums

jQuery UI Widgets Forums Grid Column title with button

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

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Column title with button #57823

    Ridbark
    Participant

    Hello,

    I had create a grid to check some things.
    Each column is divided in 2 column, which contains checkboxes.
    The user can check only one checkbox for an entire row.

    My question is : can i put a button in the column title, to check all the checkboxes of my column when i click on this button? I know, i have to create the action of this button myself, but the important is : can i put a button into a column title? Even if it’s not really “logical”?

    Best regards,
    Ridbark

    Column title with button #57833

    Peter Stoev
    Keymaster

    Hi Ridbark,

    This is already implemented: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/checkboxselection.htm?arctic

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Column title with button #57858

    Ridbark
    Participant

    Hello Peter,

    It’s not really what i need.
    I create a JSFiddle to illustrate what i need (without the button in column title) : http://jsfiddle.net/cocoRid/7vY2s/
    I need to put a button in the column title “Group 1”, “Group 2”, “First” and “Second”, with the possibility to modify the event “onclick”.
    Is it possible to do that with the jqxGrid element or by getting each column with jQuery and add a button myself?

    Best regards,
    Ridbark

    Column title with button #57882

    Peter Stoev
    Keymaster

    Hi Ridbark,

    Sorry, but, it is not possible to add a widget within the column’s title.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Column title with button #58013

    Ridbark
    Participant

    Hello,

    For information, i found a solution : you put into the “text” attribute of a column this : ‘<button type=”button” class=”button_column_grid” id=”….”>your_text</button>’ instead of ‘your_text’.
    In the JavaScript, you add this code : ‘$(‘.button_column_grid’).on(‘click’, function(e) {…});’
    And that’s it!

    Ridbark

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

You must be logged in to reply to this topic.