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.
Unfortunately, activation email could not send to your email. Please try again.

Removing the down icon from comboboxes

Thread ID:





77048 Oct 9,2008 02:21 PM Oct 13,2008 08:17 AM Windows Forms 1
Tags: GridControl
Geoff Parker
Asked On October 9, 2008 02:21 PM

I am using a column containing combo boxes to format the column data in databound grid.

Eg the datatable that is bound to the grid contains values such as X, A and I display Cancelled or Accepted etc.

This works well but I will never need the user to edit this column so don't need the down arrow icon you click on to activate the drop down. Is there a way to hide this icon ?


Rajadurai C [Syncfusion]
Replied On October 13, 2008 08:17 AM

Hi Geoff,

Thanks for your interest in Syncfusion products.

You can prevent the user from changing the combobox cells by making them 'read-only' instead of hiding the dropdown icon button. Please try the following code in PrepareViewStyleInfo event to achieve this feature.

private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender,GridPrepareViewStyleInfoEventArgs e)
if(e.ColIndex == 3 && e.RowIndex != 0) //Check for combobox cell
e.Style.ReadOnly = true;

Please check out the sample here.



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.

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.