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

Show command on particular row with Angularjs

3 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 24 Aug 2015, 03:41 PM

Hi,

I would like to show a custom command on row with a condition on model.

Ex : mydata : [

 {id:1,test:'one',showCmd:true},  // show the command

 {id:2,test:'two',showCmd:false},‚Äč // hide the command

]

How can I do that with such model ?

I've tried to  implement ng-if on template button command, but as I guess it is not compile each time, it doesn't do the job.

 

Thanks in advance for your help

 

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 26 Aug 2015, 11:32 AM

Hello Nicolas,

You can use a template with conditional statements that you can use to determine which type of command you want to show. Please check the following documentation articles:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.template 

and

http://docs.telerik.com/kendo-ui/framework/templates/overview

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Nicolas
Top achievements
Rank 1
answered on 03 Sep 2015, 01:35 PM

Hi,

Sorry for my late response. Thanks for your help it solve my problem

I use a template like #{if(mycolumnfield=='foo'){# <button>foo</button> #}# and it works like a charm.

Thanks for you support.

0
Kiril Nikolov
Telerik team
answered on 04 Sep 2015, 08:09 AM

Hello Nicolas,

 

Happy to help!

 

In case you have any further questions, please do not hesitate to contact us.

 

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Nicolas
Top achievements
Rank 1
Share this question
or