html-table

Angular *ngFor loop through an array of arrays

坚强是说给别人听的谎言 提交于 2020-06-17 03:34:39
问题 I have an array which contains other arrays inside like that: array = [ ["element A", "element B"], ["YES", "NO"] ] And I want to loop through this array of object in an HTML table using ngFor: <table> <thead> <tr> <th>#</th> <th>COLUMN 1</th> <th>COLUMN 2</th> </tr> </thead> <tbody> <template *ngFor="let row of csvContent; let in = index"> <th scope="row">{{in}}</th> <template *ngFor="let c of row; let in = index"> <td> {{c[0]}} </td> </template> </template> </tbody> </table> I want to

Prevent collapse of empty rows in HTML table via CSS

回眸只為那壹抹淺笑 提交于 2020-06-10 07:24:07
问题 I have a HTML table as follows: <table border="1"> <tr> <td>Row with text</td> </tr> <tr> <td></td><!-- Empty row --> </tr> </table> When you run this you'll see the second row is collapsed, but I'd rather it was rendered uncollapsed, with the same height as the first row. One way of doing this is to put a   entity, as follows: <table border="1"> <tr> <td>Row with text</td> </tr> <tr> <td> </td><!-- Empty row --> </tr> </table> Is there a way I can achieve the second result, via CSS, using

How to set data of table down to particular heading in Table using Angular?

孤者浪人 提交于 2020-06-01 05:08:17
问题 I have implemented table row, column after reading from .csv files. All data is coming in good way, But after click on heading on table, Data is loading only down to first column. Ideally data show down to respective column. I am sharing some screen shot for the more understanding: I am using below table: https://www.w3schools.com/css/tryit.asp?filename=trycss_table_fancy app.component.html <div class="content" role="main"> <div class="container"> <table class="table customers table-striped"

putting inline style using ternary operator php

吃可爱长大的小学妹 提交于 2020-05-30 09:37:11
问题 I am trying to add css inline style based on a php variable's value. I tried doing so with ternary operator, and also I converted the variable value to float. But the css is not being applied as expected. <tbody> <?php $totalLeaveTaken = 0.00; $totalBalance = 0.00; foreach ($GetEmployeeLeaveBalance as $member): $totalLeaveTaken += $member['usedDays']; $totalBalance += $member['Remaining_Leave_Days']; $leaveBalance = floatval($member['Remaining_Leave_Days']); ?> <tr> <td><?php echo $member[

bootstrap-vue table td element styling

微笑、不失礼 提交于 2020-05-15 05:43:26
问题 I have an issue by giving styles to the <td> tag of b-table element. This is the template: <b-table :fields="fields" :items="items" class="mx-1 mt-2" v-if="items && items.length > 0" > <template slot="email" slot-scope="row" > <div :title="row.item.email"> <p class="user-email">{{row.item.email}}</p> </div> </template> </b-table> And this is the fields: fields: [ { key: "email", label: "Email"}, { key: "user", label: "Name" }, { key: "role", label: "Role" } ], I want to give max-width of

Get value from HTML table input cell with Javascript

纵饮孤独 提交于 2020-05-13 14:19:32
问题 I have created a HTML table dynamically with Javascript where the first column consists of text fields, the second column consists of input fields and the third column consists of text fields, which works fine: nrOfRows = document.getElementById("myId").value; //get nrOfRows from input var i; var row; var cell1; var cell2; var cell3; for (i = 0; i < nrOfRows; i++) { row = table.insertRow(i); //table is defined earlier cell1 = row.insertCell(0); cell2 = row.insertCell(1); cell3 = row

HTML2PDF doesn't recognize tables' sizes

筅森魡賤 提交于 2020-05-11 04:56:46
问题 I'm working in a web page developed using Yii Extension and I'm using the HTML2PDF extension to generate PDFs (http://html2pdf.fr/). Though the PDF is generated fine, it doesn't seem to recognize my tables' sizes; doesn't matter the width or height I specify for a row or a whole table: the PDF is always generated the same way (with a table width that just fits the cell content)... Here is how I'm trying to specify the width: <table width="500px" height="20px" style="margin:10px;"> <tr> <td

Iterate through table rows and print column text with Python Selenium

好久不见. 提交于 2020-05-09 18:33:00
问题 I have a table ( <table> ) with values in each row ( <tr> ) from its body ( <tbody> ). The value I would lile to print out is in the <span> inside a <div> tag. Inspecting the html, I see the value e.g. "Name" is in row 1 (tr[1]), column 2 (td[2]): <tr class="GAT4PNUFG GAT4PNUMG" __gwt_subrow="0" __gwt_row="0"> <td class="GAT4PNUEG GAT4PNUGG GAT4PNUHG GAT4PNUNG"> <td class="GAT4PNUEG GAT4PNUGG GAT4PNUNG"> <div __gwt_cell="cell-gwt-uid-324" style="outline-style:none;"> <span class="linkhover"

Iterate through table rows and print column text with Python Selenium

巧了我就是萌 提交于 2020-05-09 18:32:09
问题 I have a table ( <table> ) with values in each row ( <tr> ) from its body ( <tbody> ). The value I would lile to print out is in the <span> inside a <div> tag. Inspecting the html, I see the value e.g. "Name" is in row 1 (tr[1]), column 2 (td[2]): <tr class="GAT4PNUFG GAT4PNUMG" __gwt_subrow="0" __gwt_row="0"> <td class="GAT4PNUEG GAT4PNUGG GAT4PNUHG GAT4PNUNG"> <td class="GAT4PNUEG GAT4PNUGG GAT4PNUNG"> <div __gwt_cell="cell-gwt-uid-324" style="outline-style:none;"> <span class="linkhover"

Sorting non English names in Javascripts [duplicate]

霸气de小男生 提交于 2020-05-08 19:09:28
问题 This question already has answers here : How to compare Unicode strings in Javascript? (6 answers) Closed 5 years ago . I'm using the following script in order to sort (alphabetically) columns in HTML tables. The script works like a charm except that I don't have full control of non-English characters. If I have a word beginning with “Ü” for example, this is not treated like a “U” (as it should be). There is an easy way to transliterate characters before performing the sorting (like ü->u, ä-