Hello,
it is possible to use the edit and delete buttons,but to put my own action,a javascript function,when i click on them?
i want to use them,because they already have their style(image and color) ,OR to create custom buttons just like the edit/delete buttons,with my own handler when i click on them.
Regards,
Daniel
it is possible to use the edit and delete buttons,but to put my own action,a javascript function,when i click on them?
i want to use them,because they already have their style(image and color) ,OR to create custom buttons just like the edit/delete buttons,with my own handler when i click on them.
Regards,
Daniel
7 Answers, 1 is accepted
0
Hello Daniel,
To achieve this you could define a custom command
E.g.
and on dataBound attach the classes, that are used for the edit/delete icon.
E.g.
Dimiter Madjarov
the Telerik team
To achieve this you could define a custom command
E.g.
columns.Command(command => command.Custom(
"commandName"
).Click(
"handlerName"
));
and on dataBound attach the classes, that are used for the edit/delete icon.
E.g.
function
dataBound(){
$(
".k-grid-commandName span"
).addClass(
"k-icon k-edit"
);
}
All the best,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daniel
Top achievements
Rank 1
answered on 12 Apr 2013, 01:22 PM
but if i do not put nothing a text for the custom command,something like this .Custom(" ")
than how can i call that class?because sometimes i want to use for space reasons only the button with its icon.
regards,
than how can i call that class?because sometimes i want to use for space reasons only the button with its icon.
regards,
0
Hello Daniel,
In the current scenario the default class of the custom command would be .k-grid- . We are currently working on providing a way to assign a custom class to custom commands.
Wish you a great day!
Dimiter Madjarov
the Telerik team
In the current scenario the default class of the custom command would be .k-grid- . We are currently working on providing a way to assign a custom class to custom commands.
Wish you a great day!
Kind regards,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Daniel
Top achievements
Rank 1
answered on 15 Apr 2013, 06:52 AM
Ok,thank you for the informations.
0
Max
Top achievements
Rank 1
answered on 04 Jul 2013, 01:23 PM
How to do this with javascript? Without MVC.
Thanks.
Thanks.
0
Hello Ali,
The approach when using the Kendo UI Web Grid is basically the same.
You should define the custom command
And then add the icon in the dataBound event handler
Please let me know if this was the information that you were looking for. I wish you a great day!
Dimiter Madjarov
Telerik
The approach when using the Kendo UI Web Grid is basically the same.
You should define the custom command
{ command: {name:
"commandName"
, text:
"View Details"
, click: showDetails }, title:
" "
}
And then add the icon in the dataBound event handler
function
dataBound(){
$(
".k-grid-commandName span"
).addClass(
"k-icon k-edit"
);
}
Please let me know if this was the information that you were looking for. I wish you a great day!
Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Max
Top achievements
Rank 1
answered on 23 Aug 2013, 06:39 AM
Yes it works, thanks.