Hi,
In my view, i have a grid using the material theme. When I started editing the grid, the editable cells have a line at the bottom of the cell. Is it possible to remove this line?
|
@Html.EJS().Grid("Edit").DataSource((IEnumerable<object>)ViewBag.DataSource).ActionBegin("actionBegin").ActionComplete("actionComplete").Columns(col =>
{
. . .
}).AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true); }).Toolbar(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" }).Render()
<script>
function actionBegin(args) {
if (args.requestType === 'beginEdit') {
var index = args.rowIndex + 1;
document.querySelectorAll('.e-grid .e-content tr')
[index].classList.add('e-custom');
}
}
function actionComplete(args) {
if (args.requestType === 'save' || args.requestType === 'cancel') {
var index = args.rowIndex + 1;
document.querySelectorAll('.e-grid .e-content tr')
[index].classList.remove('e-custom');
}
}
</script>
<style>
.e-grid tr.e-row.e-custom .e-rowcell {
border-top-width: 0;
}
</style>
|
Hi,
Your example did not work as expected. The image you supplied is exactly what I mean. That border in your image at the bottom is what needs to go away.
My grid is quite large (a lot of columns) and most edit types are numeric or text.
One of the columns is also a template column that creates a text input. I have tried overriding the style and class on the template, but it does not remove the line at the bottom of the text field.
The package version is 19.4.0.41
|
<style>
tr.e-row.e-editedrow + tr .e-rowcell {
border-top-width: 0;
}
</style>
|