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
45
Translation in UltraWebGrid
posted

I have a columns in a UltraWebGrid which are filled with a DataSet that contains boolean values.

I want to show in the Grid the word "NO" when the cell of the DataSet is "0" and "YES" when the cell of the DataSet is "1"

I did it with the event InitializeRow but it makes the application slow down.

protected void UltraWebGrid1_InitializeRow(object sender, RowEventArgs e)
        {
            if (Convert.ToInt32(e.Row.Cells[10].Value) == 0)
                e.Row.Cells[10].Value = "NO";
            else if (Convert.ToInt32(e.Row.Cells[10].Value) == 1)
                e.Row.Cells[10].Value = "YES";
        } 

How can I make this translation more efficiently and stylish?

Can be done with the ValueList property of the columns?

Thanks.