Hi,
How can I set all column with same width at run time.
I have a button in my application, when the user press this button above mentioned functionality must work.
regards,
pgr2007
Here's some code I'd use for this. I haven't tested it, but it illustrates the approach. You'd call this method from your button click, passing in a reference to your WinGrid as well as the width you want set on all columns.
using Infragistics.Win.UltraWinGrid;...private void ResetColumnWidths(UltraGrid grid, int width){ foreach (UltraGridBand band in grid.DisplayLayout.Bands) { foreach (UltraGridColumn column in band.Columns) { column.Width = width; } }}
Assumptions made here:
HI,
Thanks for the reply,
I actually thought that there will be an in-build method to do this. Here we have to find the width(the maximum width a column can have while equally sharing). Also some of my columns are hidden, so no need to allocate width to that columns.
Regards,
There's no such built-in method that I know about.