Select a row which has a class already
Select a row which has a class already
Hello, I would like to know how to change the style of the row when you click on it, and there is already a background-color on the row. I used the "select function"
Here is an example: http://live.datatables.net/qalujigo/1/edit
Apparently, the row is selected, but the user can't see that the row is selected ...
Also, is it possible to change the font weight in bold ?
And to create a button that "clear" all the selected row ? (Because I don't want that the user need to click on each row that he selected before to unselect all of them.)
Geoffrey
This question has accepted answers - jump to:
Answers
If you are using the background colour for something else, then you need some other way to indicate that the row is selected. You could use the checkbox options in Select to do that for example.
Yes - the CSS
font-weight
option would be used for that.If you were using the Select extension you can use
rows().deselect()
to do that. You don't appear to be using Select though, so you would need some custom code.Allan
Ok thanks, I didn't know about the select extension... I use it now, but how is it possible to change the class .....
Here what I did:
I used Firebug to see that this is working, I mean, I saw that:
<tr class="odd row_red selected_row" role="row" style="height: 35px;">
Also, I can get the value of each selected row
But the row is not in bold ! Please can you explain me, why ?
Geoffrey
I don't believe that is valid CSS. Use just:
Allan
ok ... thank you XD
sorry ... ;)