Hi,
When I click add, the new row bottom line is miss, I think the line is move up to last row, this is a bug?
https://stackblitz.com/edit/angular-aleqwn-bug?file=app.component.html
I just modify some code in your below demo sample
https://ej2.syncfusion.com/angular/demos/#/material/grid/normal-edit
|
[app.component.css]
.e-row.e-addedrow .e-editcell.e-normaledit {
border-style: solid;
border-width: 0 0 1px 0;
border-color: #e0e0e0;
}
|
Hi,
It seems not work for columns using the "*ngFor". Add and Edit the last row both not work.
Please check!
https://stackblitz.com/edit/angular-ryyg4v?file=app.component.ts
Do you have any idear?
I saw your example. My problem is that when editing the last record or adding a new record, there is no line at the bottom of the line being edited. This is a bug...
|
App.component.ts
template = ` <div ngForm #orderForm="ngForm">
<table class="e-table e-inline-edit" cellspacing="0.25">
<colgroup >
<col style="width: 120px;" />
<col style="width: 120px;" />
<col style="width: 120px;" />
<col style="width: 120px;" />
<col style="width: 120px;" />
</colgroup>
<tbody>
<tr>
<td class="e-rowcell" >
<div class="e-input-group">
<input
class="e-input e-field"
type="text"
#OrderID
style="text-align: right"
/>
</div>
</td>
<td class="e-rowcell" >
<div class="e-input-group">
<input
class="e-input e-field"
type="text"
#OrderID
style="text-align: right"
/>
</div>
</td>
<td class="e-rowcell" >
<div class="e-input-group">
<input
class="e-input e-field"
type="text"
#OrderID
style="text-align: right"
/>
</div>
</td>
<td class="e-rowcell" >
<div class="e-input-group">
<input
class="e-input e-field"
type="text"
#OrderID
style="text-align: right"
/>
</div>
</td>
<td class="e-rowcell" >
<div class="e-input-group">
<input
class="e-input e-field"
type="text"
#OrderID
style="text-align: right"
/>
</div>
</td>
</tr>
</tbody>
</table>
</div>`;
finalTemplate = '';
editSettingsTemplateHeader = ` <div ngForm #orderForm="ngForm">
<table class="e-table e-inline-edit" cellspacing="0.25">`;
prepareTemplate(columns) {
let colgroup = createElement('colgroup');
columns.filter((index) => {
let col = createElement('col');
col.style.width = '120px';
colgroup.appendChild(col);
});
console.log(colgroup);
this.finalTemplate = this.editSettingsTemplateHeader + colgroup.outerHTML;
console.log(this.editSettingsTemplateHeader + colgroup.outerHTML);
this.renderBodyTemplate(columns);
}
renderBodyTemplate(columns) {
let tbody = createElement('tbody');
let tr = createElement('tr');
columns.filter((col) => {
let td = createElement('td');
td.classList.add('e-rowcell');
let divEle = createElement('div');
divEle.classList.add('e-input-group');
let inputEle = createElement('input');
inputEle.classList.add('e-input');
inputEle.classList.add('e-field');
inputEle.id = col.field;
inputEle.style.textAlign = 'right';
inputEle.setAttribute('name', col.field);
divEle.appendChild(inputEle);
td.appendChild(divEle);
tr.appendChild(td);
});
tbody.appendChild(tr);
this.finalTemplate =
this.finalTemplate + tbody.outerHTML + '</table></div>';
console.log(this.finalTemplate);
}
….
this.editSettings = {
allowEditing: true,
allowAdding: true,
allowDeleting: true,
mode: 'Normal',
template: this.finalTemplate,
newRowPosition: 'Bottom',
}; |
Hi,
Does the Yellow sentence matter? It has no effect after I delete it on the last sample.
Your example is too complicated. Why not simply modify it on the example?
https://stackblitz.com/edit/angular-ryyg4v-wuu6pt?file=app.component.html
I can't create an interface like your example.
If I insist on using such a for loop, how do I deal with this missing bottom line problem ?
Another question,
If I set the grid's enableVirtuallization is "true", the bottom line is missing after load data.
https://stackblitz.com/edit/angular-mvswkv?file=app.component.html
|
<td style="text-align: right" class="e-rowcell e-lastrowadded" *ngFor="let item of cols">
|