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.
Hi fantur,
The approach you are using is probably the most efficient one. If you want to look at alternative ways to achieve your requirement you might want to consider using the UltraWebCalcManager to calculate the value for your column. A guide for doing that is available at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=WebCalcManager_Creating_a_Calculated_Column_in_WebGrid.html
Please contact me if you have any questions.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://es.infragistics.com/support