@tbettinazziaxioma-it
@tbettinazziaxioma-it
Forum Replies Created
-
AuthorPosts
-
tbettinazzi@axioma.it
ParticipantI added an id field named id.
I defined in the DataSource keyDataField : ‘id’
I defined it in columns as
{label : ‘Id’, dataField:’id’, width:’auto’, align: ‘center’, width: ‘15%’, visible : true, allowEdit: false},
I filled it.
but getSelectedRowIds() still returns the row number of the selected rows and not my id.
Tks
tbettinazzi@axioma.it
ParticipantMy data field is defined as
{label : ‘Code’, dataField:’CODICE’, width:’auto’, align: ‘center’, width: ‘15%’, visible : true, allowEdit: false},
Shouid I add something to make it the id or I need to add a column named id to my columns ?
I also tried to add row.id value to each row but it seems to ignore it.
Tks
tbettinazzi@axioma.it
ParticipantTks
I found also a metod getSelectedRowIds.
Is there the way to declare a column ad id ?
Tks
tbettinazzi@axioma.it
ParticipantTks, it seems to work.
There’s only a side effect I don’t understand.
When I click the button, rows in the grid shrink.
Why ?
Tullio
tbettinazzi@axioma.it
ParticipantSorry but I don’t see any clickable button on the table.
The info field doesn’t react to any click.
Looking at source code I don’ see any button or smart-button in it.
Tks
tbettinazzi@axioma.it
ParticipantI created a testcase I’ll append below.
In the demo the relevant object is the Quantity field .
Running it as a demo You’ll see :
. clicking on the + in the Quantity field the dimension of the first row will reduce (why ?)
. clicking on the + button in the first line You’ll never see the required action (open a page in another window)
. clicking on the + button in the second line You’ll see sometime the required action (open a page in another window) and sometime not.
If you remove editing it works (but I need it for another field not in the demo).
I’ll send the testcase by mail.
Tks for Your help
Tullio
-
This reply was modified 11 months, 1 week ago by
tbettinazzi@axioma.it.
tbettinazzi@axioma.it
ParticipantThe problem seems to be more complex.
I’ setted the template as shown below and the button is allways shown but clicking the button sometimes it works and sometime it doesn’t.
To be more clear sometime I see “Piu” and the new page opens; sometime I see “Passo di qui” and “Passo di qua” on the console.
Why ?
tks
{label : ‘Quantity’, dataField : ‘XXX_Q’, showIcon: true, align: ‘center’, icon: ‘fa-plus-circle’, cellsAlign: ‘center’, width: 120,
template: function(formatObject) {
if (!formatObject.template) {
console.log(“Passo di qui”);
const plus = document.createElement(‘smart-button’);
plus.innerHTML = ‘<span class=”fa fa-plus cfg-button-font-icon”></span>’;
plus.addEventListener(‘click’, () => {
console.log(“Più”);
window.open(“https://www.w3schools.com”);
});
const template = document.createElement(‘div’);
template.appendChild(plus);
formatObject.template = template;
}
else {
console.log(“Passo di qua”);
}
}
},-
This reply was modified 11 months, 1 week ago by
tbettinazzi@axioma.it.
-
This reply was modified 11 months, 1 week ago by
tbettinazzi@axioma.it.
-
This reply was modified 11 months, 1 week ago by
tbettinazzi@axioma.it.
tbettinazzi@axioma.it
ParticipantI looked at the example.
In my environment itm didn’t work and then I tryed to reproduce in your demo.
I modify the code as shown below simply adding some console.log but the console.log is never executed or, better, I don’t see the message. Why ?
Tks
{ label: ‘Quantity’, dataField: ‘Quantity’, showIcon: true, align: ‘center’, icon: ‘fa-plus-circle’, cellsAlign: ‘center’, width: 120,
template: function (formatObject) {
if (!formatObject.template) {
console.log(‘Entrato’);
const data = document.createElement(‘span’);
const plus = document.createElement(‘smart-button’);
const minus = document.createElement(‘smart-button’);
plus.style.background = getChipColor(0);
minus.style.background = getChipColor(5);
plus.innerHTML = ‘<span class=”fa-plus”></span>’;
minus.innerHTML = ‘<span class=”fa-minus”></span>’;
data.innerHTML = formatObject.value;
data.style.marginLeft = ‘7px’;
plus.row = formatObject.row;
minus.row = formatObject.row;
plus.addEventListener(‘click’, () => {
const row = plus.row;
console.log(‘plus ‘);
row.getCell(‘Quantity’).value += 5;
});
minus.addEventListener(‘click’, () => {
const row = minus.row;
console.log(‘Minus ‘);
row.getCell(‘Quantity’).value -= 5;
});
const template = document.createElement(‘div’);
template.appendChild(data);
template.appendChild(minus);
template.appendChild(plus);
formatObject.template = template;
}
else {
formatObject.template.firstChild.innerHTML = formatObject.value;
const buttons = formatObject.template.querySelectorAll(‘smart-button’);
buttons[0].row = formatObject.row;
buttons[1].row = formatObject.row;
}
}-
This reply was modified 11 months, 1 week ago by
tbettinazzi@axioma.it.
tbettinazzi@axioma.it
ParticipantSorry but I already have the name attribute in the dropdown list but still it doesn’t work.
Data are not sent back by the form.
Tks
tbettinazzi@axioma.it
ParticipantI’m forced to reopen this issue because the problem went out again.
Using auto-height in smatr-tabs id there’s a combo opening in the tab it’s not shown completely.
I can’t use the dropDownAppendTo feature to append id to the body becuase the combo whithin a form andI don’t get back the selected value.
How can I solve that issue ?
Tks
tbettinazzi@axioma.it
ParticipantI created a testcase on codpenn
You’ll see that if You comment the last appendChild it goes faster in a visible way.
Tks
tbettinazzi@axioma.it
ParticipantIt works but the HTML is still not understood and <br/> is not interpreted as carriage return.
Tks
tbettinazzi@axioma.it
ParticipantSorry but it doesn’t seem to work.
With the following js code the window appears empty with any message I can use (also “Bye”).
const window = document.createElement(“smart-dialog-window”);
window.innerHTML= message;-
This reply was modified 1 year, 4 months ago by
tbettinazzi@axioma.it.
tbettinazzi@axioma.it
ParticipantI already did it but I didn’t see anything strange : the opacity is set to 1 but the tooltip it’s still transparent (I use Firefox).
tbettinazzi@axioma.it
ParticipantI’m not able to unberstand where the problem could be.
Your testcase works.
If I put my css classes in Your testcase it still works.
In my environment I verified that opacity is set 1 and is kept but the tooltip is still trasparent (background yellow)
I dont’ see where I should look for.
Any further suggeston ?
Tks
-
This reply was modified 11 months, 1 week ago by
-
AuthorPosts