Display Delete button in a column of a datagrid

-1
Hi , My requirement is to place delete button in all the rows. so I used template grid and achieved it. But i'm getting the headers also repeatedly as many no of rows created. Can I prevent the header to be created only once at the top, not for every row.     Thank you.
asked
4 answers
4

You could add a class to the table containing something in the lines of:

 

tr:not(:first-child) {
    visibility: hidden;
}

 

answered
4

You can use CSS to only show the header once and not every row, add a class to the header (CLASS-FOR-HEADER) in this example and then show it only on the first row:

 

.mx-templategrid .mx-templategrid-row .CLASS-FOR-HEADER {
    display: none;
}

.mx-templategrid .mx-templategrid-row:first-child .CLASS-FOR-HEADER{
    display: block;
}

 

answered
2

The DataGridExtension widget in the app store is capable of placing buttons inline in a DataGrid as well.

answered
0

You could also add the headers above the template grid, and use something like flexboxes to align it on top of the template grid,

answered