Hi Haneef,
Thanks for the response. Thats what I was needing.
Thanks and Regards
Prashant Agarwal
>Hi Prashant,
You can use the Renderer.GetCellBoundsCore() method to get the size of the covered cells in a grid. Here is a code snippet to show this.
private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
GridControl grid = sender as GridControl;
GridCurrentCell cc = grid.CurrentCell;
GridRangeInfo range = GridRangeInfo.Cell(cc.RowIndex,cc.ColIndex);
if( grid.Model.CoveredRanges.Ranges.AnyRangeContains(range))
{
int width = cc.Renderer.GetCellBoundsCore(cc.RowIndex,cc.ColIndex).Width;
e.Size= new Size(width,e.Size.Height);
}
}
Here is a sample.
GCCoveredCells.zipBest Regards,
Haneef