Hi All,
I am using custom commands in a Grid column (provided as array of buttons), which works until I use the standard 'text' attribute captioned buttons. To reduce the column size I am trying to replace the standard button appearance with the Kendo provided icons (seen here), the definition starts like this:
with CSS override of:
The column appears properly, however the decreaseIndent function does not get triggered. Can not add the call to the template by onclick either, as the event arguments are lost that way, therefore loosing the vital info of the current row position, so the following does not work anymore:
Could someone please advise on the proper approach to have Kendo icons as command buttons and on the same time having a click function with proper event arguments? Tried to find similar topics, but could not find any.
I am using custom commands in a Grid column (provided as array of buttons), which works until I use the standard 'text' attribute captioned buttons. To reduce the column size I am trying to replace the standard button appearance with the Kendo provided icons (seen here), the definition starts like this:
columns: [
{
command: [
{ name: "decreaseIndent", click: decreaseIndent, template: "<
a
class
=
'k-button'
><
span
class
=
'k-icon k-i-arrow-w'
></
span
></
a
>" },
<
style
type
=
"text/css"
>
.k-grid tbody .k-button {
min-width: 28px;
width: 28px;
padding: .1em .4em .3em;
}
</
style
>
function decreaseIndent(e) {
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));