This is a migrated thread and some comments may be shown as answers.

Avoid k-button css class added

4 Answers 863 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mojtaba
Top achievements
Rank 1
Mojtaba asked on 27 Mar 2019, 04:29 PM

Hello,

When I am using kendoGridRemoveCommand (or kendoGridEditCommand etc.) directives, the k-button class is added to the element automatically. How can I avoid that because I don't want any styles coming from that.

I am aware of some possible work around such as removing the class by JQuery or writing another class to override the css styles of k-button, but isn't there a better solution?

Regards.

4 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 29 Mar 2019, 09:32 AM
Hello Mojtaba,

The most straight-forward approach to achieve the desired behavior and gain full control over the elements within the command column and their behavior, is to use regular HTML buttons with no Kendo Grid editing directives applied, and handle their click events to trigger the respective editing-related methods, e.g.:

https://stackblitz.com/edit/angular-nlckoq?file=app/app.component.ts

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Mojtaba
Top achievements
Rank 1
answered on 29 Mar 2019, 09:51 AM

Hi Dimiter,

Thanks for the reply.

OK, it seems that the functionality of the directives are tied to the styles so that I should either take both or none. Just as a quick suggestion, it might be good to add an input parameter to the directives (e.g., "@Input() public applyStyles = true") to apply the css classes optionally.

Best regards,

Mojtaba

0
Dimiter Topalov
Telerik team
answered on 02 Apr 2019, 07:37 AM
Hi Mojtaba,

Indeed, the built-in command button directives provide the styling and specific hide/show functionality out-of-the-box. We appreciate your suggestion for enhancement. Could you please open a new feature request in our dedicated Feedback portal so we can track it, and try to estimate the customer demand for such a functionality:

https://feedback.telerik.com/kendo-angular-ui

Thank you in advance.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Brian Edwards
Top achievements
Rank 1
answered on 03 Sep 2019, 05:14 PM
I agree with this request.  After upgrading Kendo, I have lots of changes I need to make now.
Tags
Grid
Asked by
Mojtaba
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Mojtaba
Top achievements
Rank 1
Brian Edwards
Top achievements
Rank 1
Share this question
or