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
163
Handling NULL in UltraGrid
posted

I have a situation where the ultragrid is bound to the DataTable where the DataTable is created using a Text File which is Tab Delimited i.e. columns are identified by Tab and rows are on subsequent lines.

What I want is that if I have a Number Column, and there is a null value for a cell, it should display "NULL" on the cell, how can I achieve this if there is any possibility.

 

 Regards,

Talha Muhammad 

  • 469350
    Verified Answer
    Offline posted

     Hi Talha,

         You can do something like this:


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                e.Layout.Bands[0].Columns["Number"].NullText = "NULL";
            }