Hide sub question text column in a grid question: Difference between revisions
From Catglobe Wiki
More actions
No edit summary  | 
				Cg huyphong (talk | contribs) No edit summary Β   | 
				||
| Line 28: | Line 28: | ||
}  | }  | ||
</source>  | </source>  | ||
==Code sample ==  | |||
Open the qnaire template of the qnaire "Js demo - some js samples" (Resource Id: 159684). View the Question "Q_ScaleGrid"  | |||
Latest revision as of 04:41, 10 February 2012
Challenge
In order not to show sub question texts in a grid question
As a questionnaire creator
I want to hide the sub question text column
Example
When creating a scale grid question, its sub question text is displayed as a column in the grid.
I want to hide that column because it has no use in my context.
Solution
The style sheet applied to sub question text cells isΒ grid_subquestion_text, therefore we need to search all the elements using that style sheet class and hide them.
Code
quest.onInit = function()
{
	$(".grid_subquestion_text").hide();		
}
Code sample
Open the qnaire template of the qnaire "Js demo - some js samples" (Resource Id: 159684). View the Question "Q_ScaleGrid"
				
