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

Column template

2 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric Schoenholzer
Top achievements
Rank 2
Eric Schoenholzer asked on 20 Jan 2012, 07:18 PM
Is it possible to reference another field in a column template?

Or do I need to use a rowTemplate for that?

Thanks
Eric

2 Answers, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 22 Jan 2012, 03:58 AM
Not sure if I understood your question, but this is working for me:

   { field: "textfld", title: "Some Title", template: "#= overdue(textfld, dateval) #" },

I simplified it, but the overdue() function in the template color codes the field ("textfld") based on the other field ("dateval") value.   Seems to let me reference any of the other field names just fine...
0
Eric Schoenholzer
Top achievements
Rank 2
answered on 22 Jan 2012, 06:11 PM
Thanks Andrew,

Yes, that's more or less whay i'm trying to do. Something like this:

 { field: "textfld1", title: "Some Title", template: "<label title='#= textfld2 #'>#=  textfld1 #</label>" }

I need to try it.

Eric
Tags
Grid
Asked by
Eric Schoenholzer
Top achievements
Rank 2
Answers by
Andrew
Top achievements
Rank 1
Eric Schoenholzer
Top achievements
Rank 2
Share this question
or