Radio Buttons or checkbox with single selection on Datatables - datatable

I am using a datatable with checkboxes on the first column that permit multiple selection.
But now, I need that this checkboxes permit only single selection or it can be used a radio button on it.
This is the link to show my page http://cursosites-com-br.stackstaging.com/suporte_datatables.php
Can someone help me?
Regards,
Pedro

I found an example on the comments of this link (https://www.gyrocode.com/articles/jquery-datatables-row-selection-using-checkboxes-and-select-extension/comment-page-3/#comments)
Very good!

Related

How to select specific radio button in a group of similar radio buttons in Selenium Web Driver?

I am trying to automate a booking process from an airline site.
In the second page of the booking process ('Select Flights'), there are multiple radio buttons which are very similar with other radio buttons available in the page. How can I select the radio button that I want to click?
I have already tried the xpath of the radio button but to no avail.
Here is the html code of the radio button:
Screenshot from booking.airasia.com
Please advise. Thank you
First element
Second Element
Well its true that you are getting similar elements for that given xpath but you also have to go through their siblings/parents etc for different scenarios.
Here is the xpath I tried that identified the individual elements that you were looking for, are depicted above.
//div[#class='iradio_square-green']/input[#id='trip_0_date_0_flight_0_fare_0']/following-sibling::ins
For others radio buttons you just have to change the flight number.
Hope this helps...
:)

How to collapse/expand all subgrids of same level when clicking on first column

I would like to expand or collapse all subgrids when I click on the first column (yellow) under the selected row.
Plz see pictures below :
and I would like to add some icon in this column.
I've tried with this code in onSelectRow event :
jQuery(this).closest("tr.ui-subgrid").find("td.ui-widget-content:first").append('<span class="ui-icon ui-icon-plus"></span>');
but without success.
Many thanks for anybody who could help me.
Have a nice day
Cheers
Jihel
Many thanks Oleg for your kind help.
Therefore, I think I have not fine explained my trouble.
So, I have updated pictures for focusing my wish.
Your old answer allows to expand/collapse all rows in a grid, but that I would want is to expand/collapse all subgrids from one row at a time, and set a plus/minus icon in the first column under the selected row which trigger click event for expanding/collapsing subgrids.
If my request is not clear, plz let me know.
And many thanks to helpers.
Regards
Jihel

Multiselect option with remove item

I'm looking for a Qt/QML multiselect control that have a remove button.
I want to add a filter builder and I didn't find a good example or control for this purpose.
I can design token by myself. I'm just curious if someone already did that and can share it.
Multi filter selector
Thanks
A simple radio button for each option can do the job. If you do not include all these radio buttons under an exclusive group, a second click on these buttons deselects the option.
A click on the radio button includes selected option in the search results and second selection removes the option from the results.
An extra button which deselects all the radio buttons can also be added.
I don't intend to insult or disrespect you, but i think with radio buttons the task takes less time than posting this question.

How do I edit a jqgrid from javascript

I have a jqgrid that has several columns including a checkbox column that indicates if an item is selected.
Underneath that I have a dropdown menu and a text box. The idea is that each item in the dropdown menu is a column in the jqgrid. Then all I need to do is modified all of the checked rows with the contents of the text box for that column. So a quick mass update mechanism if you will.
The problem is, is that I can't figure out how to update a specific cell. Any tips or documentation that can help me? Thanks!
You can use for example setRowData (see jqGrid documentation) or setCell to update the data in the grid. The functions getCol, getCell or getRowData could help you the examine the row data. Another old answers: this and this could be helpful if you decide to search data in the grid with respect of jQuery.
Here's the "answer" I came up with to my problem. I wanted to edit only rows that were editable. Using setCell would overwrite my editable field with a non-editable one. So I looked at the HTML for a given row while it is in the edit state and passed that into the 'setCell' method. It feels 'hackish' though and if someone knows a better way, I'm all ears.

simpleModal to update form

To all:
I am trying to update a form input radio button(s) using simplemodal to display the div containing the radio buttons.
It displays correctly however when the modal is closed the change is lost.
is their a simple call back that can update my form?
Thanks in advance for your help.
Bob
Bob,
What exactly are you trying to do? By default, SimpleModal does not maintain form state. You can try adding the persist:true option to the modal, but there are still some issues with certain browsers.
-Eric

Resources