We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridListControl cellType customization

Thread ID:





80820 Apr 28,2009 04:01 PM UTC Sep 8,2009 11:35 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On April 28, 2009 04:01 PM UTC


I have a GridDataBoundGrid with a column CellType set to "GridListControl".

I want to customize this grid ( col width, col align, allow add new, etc).
Who I can do that?

Best regards,


Jisha Joy [Syncfusion]
Replied On April 29, 2009 06:21 AM UTC

Hi Martin,

You could handle the CurrentCellShowingDropDown event and can set the properties for ListControlPart. You can refer the grid inside the dropdown by using ListControlPart.Grid property and set the styles by handling PrepareViewStyleInfo event. Please see the code:

void gridDataBoundGrid1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if (cc.Renderer.GetType() == typeof(GridDropDownGridListControlCellRenderer))
GridDropDownGridListControlCellRenderer cr = (GridDropDownGridListControlCellRenderer)cc.Renderer;
cr.ListControlPart.AllowResizeColumns = true;
cr.ListControlPart.Grid.ColWidths[2] = 100;
cr.ListControlPart.Grid.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(Grid_PrepareViewStyleInfo);


void Grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)

if(e.ColIndex == 2)
e.Style.HorizontalAlignment = GridHorizontalAlignment.Right;


Please let me know if you have any questions.

Santosh U
Replied On July 17, 2009 04:13 PM UTC

Hi Jisha,

This is really great. Only I am not able to get the property where in I can set the dropdowngridlist control AllowNew and AllowEdit property to true.

Can you please help me.

Jisha Joy [Syncfusion]
Replied On September 8, 2009 11:35 AM UTC

Hi Santhosh,

The properties AllowNew and AllowEdit are not available for GridListControl. If your intension is to have editable drop-down grid, then this can be achieved by having drop-down gridcontrol in cell. See the following sample from our sample browser for more information:

\My Documents\syncfusion\essentialstudio\\Windows\Grid.Windows\Samples\2.0\Custom Cell Type\Drop-Down Grid Demo

Please let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon