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

Customise grid cell based on data

1 Answer 205 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Binu
Top achievements
Rank 1
Binu asked on 07 Nov 2019, 10:33 AM

Hi,

In my application i am listing personal data in kendo grid  with edit and delete feature each and every row. Here my requirment is if age > 50 i don't want to show delete
button in that row. How can achieve this with react Js?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Nov 2019, 02:28 PM

Hello, Binu,

This can be done by rendering the button conditionally based on the data item value.

Inside the custom cell which is used for adding the buttons. there is dataItem inside the props, which contains the row data.

This is an example:

https://stackblitz.com/edit/react-dprv4g?file=app/myCommandCell.jsx 

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Binu
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or