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
9364
Setting column width causing performance issue
posted

I have a Grid that has a large number of columns, one for each day. There could be 100s of columns in this DataTable for those many days.  After the DataTable is bound to the Grid, I am setting the width of each column as you see in the code snapshot. 

 

I find it hard to understand why setting the Width is so expensive. It takes 24.86 compared to setting the Format on the next line which take only 0.003 . I found it hard to  believe at first but repeated runs of C# profiler confirmed this inefficiency. 

Is there a way I can avoid setting the column width one at a time. Is there Grid level or row level setting? Or some other suggestion?

Thanks!

I am on version 7.3