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
130
Formatting individual cells in column differently
posted

I have used the Format property of the UltraGridColumn to set the format for my column, and this works as expected.

However, for one particular row in my grid I would like to format the contents of this column differently.  Is there anyway to override the column formatting for a particular cell?  Or, alternatively, is there any method I can call that will return me a formatted string if I pass in the format and a value?

Thanks.

Parents
  • 2211
    posted

     

    Hello Kallan,

    You can achieve this by using the initialize row event handler for the grid.  Use an if statement to trap for the condition that requires different formatting. 

    Protected Sub theGrid_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.RowEventArgs) Handles TheGrid.InitializeRow

    To get a reference to the cell use: 

    e.Row.Cells.FromKey("The Key").Style.....

    Hope it helps,

    Patrick

     

     

Reply Children