How to change size of Dropdown Grid

Hi Haneef ...

Can You tell me that how can i change the size of Dropdown Grid, when using "DropDownGrid" as a cell type ..

Regards,
Ubaid Tariq

3 Replies

AD Administrator Syncfusion Team February 13, 2007 05:29 PM UTC

Hi Ubaid,

You can handle the CurrentCellShowingDropDown event of the grid and set e.Size to new size. Please try the below code snippet

private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
e.Size = new Size(400,400);
}

Best regards,
Haneef


JV Jeff Voigt September 21, 2015 06:24 PM UTC

This does not work using the GridGroupingControl version (13.2451.0.29).  Setting a size to 500,500 does increase the width but the height still remains the same (5 or so lines)....


AK Adhikesevan Kothandaraman Syncfusion Team September 22, 2015 11:11 AM UTC

Hi Jeff,

Thanks for your update.

To set the DropDownGrid size for GridGroupingControl, set the e.Inner.Size in the TableControlCurrentCellShowingDropDown event. Please refer to the following code example,

Code Example:
this.gridGroupingControl1.TableControlCurrentCellShowingDropDown += gridGroupingControl1_TableControlCurrentCellShowingDropDown;

void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs e)

{

    //Set the Size for DropDown Grid

    e.Inner.Size = new Size(500,500);
}

Sample: http://www.syncfusion.com/downloads/support/forum/56291/ze/RelationKey-825733916

Regards,
Adhi


Loader.
Up arrow icon