column width with visual grid

How to enlarge the width of the column in the event of QueryCellInfo when the visual cell''s text string is longer.

3 Replies

ST stanleyj Syncfusion Team January 6, 2006 03:33 PM UTC

Hi Bob, I am not sure that I understand your need, these are some options to resize the column width see if that helps. grid.Model.ColWidths.ResizeToFit grid.Model.colwidth[col index] = size or through the handler QueryColWidth using e.index and e.size. Best regards, Stanley


HZ Hui Zhong January 6, 2006 04:54 PM UTC

When the grid is shown, we resize the column width using grid.Model.ColWidths.ResizeToFitGridRangeInfo.Rows(0,100), GridResizeToFitOptions.IncludeHeaders, However, when scrolling down, (by the way we use the virtual Grid), in the Grid_QueryCellInfo event, I hope to enlarge the column width automatically if the cell text is lengthy. >Hi Bob, > >I am not sure that I understand your need, these are some options to resize the column width see if that helps. > >grid.Model.ColWidths.ResizeToFit >grid.Model.colwidth[col index] = size >or through the handler >QueryColWidth using e.index and e.size. > >Best regards, >Stanley


ST stanleyj Syncfusion Team January 6, 2006 06:58 PM UTC

Hi Bob, Its e.Style.AutoSize = true; Thanks, Stanley

Loader.
Up arrow icon