datatable

p:remoteCommand inside iterating component like p:dataTable only works for last row

孤者浪人 提交于 2020-07-09 05:51:07
问题 i was trying to print the value entered in the inputText but it only shows 0 except for the last row it shows the right value! here's a minimal code (i didn't include all the fields and the getters/setters) @ManagedBean(name="medicament") @ViewScoped public class MedicamentBean { private List<Medicament> medicaments; private String libelle; private int qte_vente; public void test() { System.out.println(this.qte_vente); } } html: <h:form> <p:dataTable value ="#{medicament.medicaments}" var ="m

laravel datatable relationships

我是研究僧i 提交于 2020-07-08 00:38:00
问题 So in this app Drawing belongsTo Customer . I have datatable <table id='drawing-table' class="table table-bordered table-hover"> <thead> <tr> <th>Drawing number</th> <th>Customer</th> </tr> </thead> </table> which indicates $darwing->number and $customer->title . To load info I use yajra\Datatables\Datatables; . Data is loaded with this JS method: $(function () { $('#drawing-table').DataTable({ processing: true, serverSide: true, ajax: '{{route('drawings.datatable')}}', columns: [ { data:

How to get sum of two columns multiplication

谁都会走 提交于 2020-07-07 04:09:04
问题 I have a datatable in which there are two column named col1 and col2. I want to get sum of (col1 * col2) of each row. i am using following code.. object sumObject; sumObject = dt.Compute("Sum(col1* col2)", "(id = '" + id+ "') "); But it doesn't worked. It produces an error as : Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier. 回答1: A more readable way is using LINQ-To-DataSet : int sumTotal = dt.AsEnumerable() .Where(r => r.Field<int>("id"

How to get sum of two columns multiplication

只谈情不闲聊 提交于 2020-07-07 04:08:10
问题 I have a datatable in which there are two column named col1 and col2. I want to get sum of (col1 * col2) of each row. i am using following code.. object sumObject; sumObject = dt.Compute("Sum(col1* col2)", "(id = '" + id+ "') "); But it doesn't worked. It produces an error as : Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier. 回答1: A more readable way is using LINQ-To-DataSet : int sumTotal = dt.AsEnumerable() .Where(r => r.Field<int>("id"

Change the default width of a VuetifyJS DataTable cell

假装没事ソ 提交于 2020-07-06 06:56:14
问题 I'm using the VuetifyJS Data Table and I need to move the entries of each header cell as close as possible to each other. I tried to add a width to each header but that didn't work - it seems there is a predefined width one can't go below. Update: This is how it should look like - the margin between each row should be fixed at 10px: Here is a CodePen example: https://codepen.io/anon/pen/ejEpKZ?&editors=101 <div id="app"> <v-app id="inspire"> <v-data-table :headers="headers" :items="desserts"

Change the default width of a VuetifyJS DataTable cell

时光毁灭记忆、已成空白 提交于 2020-07-06 06:54:05
问题 I'm using the VuetifyJS Data Table and I need to move the entries of each header cell as close as possible to each other. I tried to add a width to each header but that didn't work - it seems there is a predefined width one can't go below. Update: This is how it should look like - the margin between each row should be fixed at 10px: Here is a CodePen example: https://codepen.io/anon/pen/ejEpKZ?&editors=101 <div id="app"> <v-app id="inspire"> <v-data-table :headers="headers" :items="desserts"

JSF datatable not complying to WCAG due to unsupported aria-label attribute

夙愿已清 提交于 2020-06-29 08:27:45
问题 I am using JSF to code my application and it has a datatable. Each row of the datatable has a checkbox in the first column, and some text in the rest of the columns. My application needs to comply to the WCAG 2.0 and I'm using a Chrome Extension "Axe" to scan my application. The "Axe" tool flagged out that the datatable with the checkboxes is not complying to the clause "Ensure every form element has a label" and the proposed solution is to add the "aria-label" attribute. However JSF

classifying multiple observations within one variable so then i can categorise them in new column . how can i make the code shorter? in R

邮差的信 提交于 2020-06-27 15:19:54
问题 i'm looking for a shortcut or less labour intensive way of grouping certain observations within the same variable, then output in a new column depending. axa$type[axa$instrument_type == "CORPORATE BONDS" | axa$instrument_type == "GOVERNMENT BONDS"] <- 'BONDS' axa$type[axa$instrument_type == "FOREIGN CURRENCY"] <- 'Cash' axa$type[axa$instrument_type == "FUT-FIXED INCOME"] <- 'Derivatives' axa$type[axa$instrument_type == "INTEREST RATE SWAP"] <- 'Derivatives' axa$type[axa$instrument_type ==

Datatables - Language change via JavaScript makes UI elements disappear instead of changing the language

你说的曾经没有我的故事 提交于 2020-06-23 04:52:31
问题 I've built a datatable using bootstrap styling and want to change the default language of the ui elements to German. https://datatables.net/examples/advanced_init/language_file.html This states that i can load the language file in a script. When I try to do it, all language related UI elements disappear instead of being displayed in German. The result is the "naked" table with no features. What could be the problem? Sorry for the bad indentation, I had troubles pasting. The script: $(document

Reload datatable after dropdown value changed

折月煮酒 提交于 2020-06-22 02:59:05
问题 I have a datatable and a dropdown. I want to change the datatable after dropdown value change. First of all, I tried the simplest trial & error by getting return value from controller after dropdown changes value and it works smoothly. Here is my code: $('#ID_Univ').change(function () { $.ajax({ type: 'GET', url: '@Url.Action("Get_Approved")', data: { ID: _Id }, success: function (data) { // data, I got return value // do something here } }); }); and then here is my datatable code var tbl