views:

16

answers:

0

I am using a DetailsyView which needs to have some fields hidden until there are some selections made.

I was looking the way to do this via the following:

  1. Apply a class to the BoundField Controls that I need to hide.
  2. Change the display style to 'none' in the class programmatically in the OnLoad method.
  3. On the Prerender method check if the databinding makes the Fields to change so I need to change the display style to 'inline'

The problem is in number 2 and 3. There are two questions.

var styleSheet = Page.Header.StyleSheet;
styleSheet.Display = "None";   // THIS DOES NOT EXIST, HOW DO I CHANGE THIS?

Also, the prerender method is only called after there is a mode change, is this the expected behavior? or something is getting catched that should'nt be?