Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
Format cells based on selection
posted

I have a grid that displays monthly numbers based on percentage or number of hours based on user selection.  Right now, I'm just learning Infragistics, I'm formatting the month columns using:

 

 

 

 

 

 

If ddlViewType.SelectedValue = "hours" Then
sFormat = ""
Else
sFormat = "0%"
End

 

 

 

 

With
e.Layout.Bands(0).Columns(8)
.Header.Caption =
"Jan"
.Format = sFormat
.Width = Unit.Pixel(50)
.CellStyle.HorizontalAlign = HorizontalAlign.Left
End With

I'm doing this in the initializelayout event so obviously it's not firing if the user changes the format criteria and resubmits the page.  Is there a way I can call initializeLayout again or is there a better way of doing this.

Thanks,

N