I'm trying to add a bootstrap label to a <th> field I have in bootstrap-table that I have so that I can get the results of the fields to display in a label. What's the best way to approach this? Putting the <span> inside the <th> doesn't yield the desired result. I'd just like the results to be labels - is this possible?
<table id="medicationtable">
<thead>
<tr>
<th data-field="Medication_Name">Medication Name</th>
<th data-field="Read_Code">Read Code</th>
<th data-field="Dose">Dose</th>
<th data-field="Date_Started">Date Started</th>
<th data-field="Date_Ended">Date Ended</th>
</tr>
</thead>
</table>
I don't think it's possible if you're generating the table from remote data. If you want to add additional html into the cells generated, you'd need to apply bootstrap-table to an already existing table in the html.
http://issues.wenzhixin.net.cn/bootstrap-table/#options/from-html.html
Related
If the URL has a parameter of the same name, the 3nd parameter does not work.
Current URL is
http://localhost:8000/backend/parts?_tab=1&search_param%5Btab%5D=2&sort=type&direction=asc
My page have two tables, two sort.
<table>
<thead>
<th rowspan="2" class="w100">Status1#sortablelink('status', ' ▲▼', ['_tab'=>1, 'search_param'=>$search_params])</th>
...
</thead>
<tbody>
...
</tbody>
</table>
<table>
<thead>
<th rowspan="2" class="w100">Status2#sortablelink('status', ' ▲▼', ['_tab'=>2, 'search_param'=>$search_params])</th>
...
</thead>
<tbody>
...
</tbody>
</table>
Second table's sort link was too "_tab=1"
http://localhost:8000/backend/parts?_tab=1&search_param%5Btab%5D=2&sort=type&direction=asc
not "_tab=2"
http://localhost:8000/backend/parts?_tab=2&search_param%5Btab%5D=2&sort=type&direction=asc
How to set sort parameter and to change url's parameter in this case?
I expected what url would be
http://localhost:8000/backend/parts?_tab=2&search_param%5Btab%5D=2&sort=type&direction=asc
I ask if anyone can help me, I import an excel table and create several rows of data with a column with the same reference, I want to update a field with a single input of all the rows with the 'Same' reference, for example I want to change the value of the same column with a single input and update the data to all, or add if it does not exist
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Same</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>255</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>255</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>255</td>
</tr>
</tbody>
</table>
I am trying to use http://www.jquery-bootgrid.com/examples#data-api
When table is loaded from SQL database, all columns show up as all check boxes are marked in drop down menu (image attached), I want that only selected columns show up by defult and user can mark the the realted column field in check box to make it visible.
.Image here
<table id="employee_grid" class="table table-condensed table-hover table-striped" width="70%" cellspacing="0" data-toggle="bootgrid">
<thead>
<tr>
<th data-column-id="id" data-type="numeric" data-identifier="true">id</th>
<th data-column-id="own_referrer">O_Refferer</th>
<th data-column-id="own_aact_status">own_aact_status</th>
<th data-column-id="rate">rate</th>
<th data-column-id="text_Details">text_Details</th>
<th data-column-id="remarks">remarks</th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false">Commands</th>
</tr>
</thead>
</table>
found the solution. Just add ( data-visible="false" ) (without brackets) to the respective th line in table.
<table id="employee_grid" class="table table-condensed table-hover table-striped" width="70%" cellspacing="0" data-toggle="bootgrid">
<thead>
<tr>
<th data-column-id="own_referrer" data-visible="false">O_Refferer</th>
<th data-column-id="own_referrer">O_Refferer</th>
<th data-column-id="own_aact_status">own_aact_status</th>
<th data-column-id="rate">rate</th>
<th data-column-id="text_Details">text_Details</th>
<th data-column-id="remarks">remarks</th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false">Commands</th>
</tr>
</thead>
</table>
Currently, I am working on Kendo-grid, with Thymleaf. I am facing an issue, I'm trying to use multiple languages in the kendo grid table. Whenever I try to apply different language on the grid, <thead> header tag is coming up with applied language but it seems that data not displayed in grid <tbody>. Grid table shows data properly when I apply the English language.
<table>
<thead >
<tr>
<th><span th:text="#{user_name}" th:remove="tag"></span></th>
<th><span th:text="#{first_name}" th:remove="tag"></span></th> </tr>
</thead>
<tbody>
<tr th:each="user : ${users}" th:object="${user}" th:classappend="${isDeleted} ? item-deleted : ''"> <td th:text="${user.username}"></td>
<td th:text="${user.firstname}"></td> </tr>
</tbody>
</table>
Im not sure why but the below query
.//*[#id='training_modules_list_table']/thead/tr[th[text()='ID']and th[text()='NAME']and th[text()='STATUS']and th[text()='VERSION']and th[text()='PACKAGE']and th[text()='REFERENCE']]
does not find anything in the html below.
<table class="table sortable stripe tablesaw-stack" data-tablesaw-mode="stack" id="training_modules_list_table">
<thead>
<tr>
<th data-sort="int">ID</th>
<th data-sort="string">Name</th>
<th data-sort="string">Status</th>
<th data-sort="string">Version</th>
<th data-sort="string">Package</th>
<th>Assigned Study</th>
<th data-sort="string">Reference</th>
<th data-sort="string"></th>
</tr>
</thead>
<tbody>
<tr>
While your question has less information that what actually you want to achieve but after seen your xpath it looks you are trying to write a xpath which return you all a tag element.
Try below xpath :-
//table[#id='training_modules_list_table']//tr/th/a
It will return you all element in a tag
Hope it will help you :)