AD
Administrator
Syncfusion Team
March 27, 2008 07:10 PM UTC
Hi Christoph,
Please refer the code below to fit the column width when doubleclicking on the header and to avoid opening an item when doubleclicking on the header.
void gridGroupingControl1_TableControlCellDoubleClick(object sender, GridTableControlCellClickEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
if (style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell)
{
this.gridGroupingControl1.TableControl.Model.ColWidths.ResizeToFit(GridRangeInfo.Col(e.Inner.ColIndex) , GridResizeToFitOptions.IncludeHeaders);
this.gridGroupingControl1.Refresh();
}
else
{
//Your Code to open the current item.
}
}
Please let me know if this helps.
Regards,
Srirajan