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

Grid DetailView ClientTemplate

0 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stella
Top achievements
Rank 1
Stella asked on 16 Apr 2012, 10:00 PM
I have a detailview for a clientside bound grid - this detail view is just two html lines but is the same detail view used by
almost all of our views - so we were trying to put the lines of code  somewhere that could be pulled by all the forms rather than having to code it in each form.
I was trying to create a helper to use but from what i have read - the helper won't work in client templates.
Would my best bet be to put it in a common function in a shared javascript library and then subscribe to 
the  event for OnDataViewExpanded in all of our vies which would then point to this function to build these 2 lines of html code? Thanks.
here is a sampble of what the 2 lines look like now in each index view:

.DetailView(

 

Sub(detailview) detailview.ClientTemplate(

 

 

 

                            "<ul>" +

 

 

 

                            "<li>Updated By: <#= UpdatedBy #></li>" +

 

 

 

                             "<li>Updated Date: <#= UpdatedDate #></li>" +

 

 

 

                             "</ul>")) _

 

Tags
Grid
Asked by
Stella
Top achievements
Rank 1
Share this question
or