Hi,
We are using syncfusion V3.2.1.0.
Our grid has RecordPreviewRow and customizable column display.
For example, when I display 3 columns, I see RecordPreviewRow taking more width than all the 3 columns together. And Preview also gets displayed in two cells in RecordPreviewRow.
But when I manually drag the columns and increase the width, then RecordPreviewRow displays only one single preview cell, which is correct behaviour. When I display 6 columns also it is fine.
But I dont want to increase the columns width, as they are always fixed (NOT ALL of equal size, and I dont want to in display full available area). When I icrease/decrease the columns number, i want to see the column header width changing and RecordPreviewRow getting adjusted, with only one preview cell per RecordPreviewRow.
How I do this?
Rgds
Rajani Kanth
BR
Badri Rajani Kanth
May 25, 2006 03:11 PM UTC
Hi,
This solution is working fine.
private void TableModel_QueryColWidth(object sender, GridRowColSizeEventArgs e)
{
if(e.Index < gridGroupingControl.TableModel.ColCount)
{
GridColumnDescriptor gridColumnDescriptor = gridGroupingControl.TableModel.GetHeaderColumnDescriptorAt(e.Index);
if( (gridColumnDescriptor != null) && (mGridColumnsText.Contains(gridColumnDescriptor.HeaderText)))
{
//dont change size
e.Handled = true;
}
}
else
{
e.Size = 0;
e.Handled = true;
}
}
Plz inform me if any thing wrong with the above code.
Rgds
Rajani Kanth