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

Chsnging Choicelist for a specific cell in GridDataBoundGrid

Thread ID:





72329 Mar 14,2008 04:41 AM UTC Mar 17,2008 01:22 PM UTC WinForms 1
Tags: GridControl
keshav kamat
Asked On March 14, 2008 04:41 AM UTC


I am using a GridDataBoundGrid, wherein in CellsChanged event i need to edit the choicelist of a specific cell whose celltype is ComboBox.But GridDataBoundGrid.Model[rowIndex, colIndex].ChoiceList = stringCollectionInstance;

does not seem to work can u suggest how i should go about doing this?

Administrator [Syncfusion]
Replied On March 17, 2008 01:22 PM UTC

Hi keshav,

Thanks for the interest in Syncfusion products.

You can edit the combobox choicelist of a specific cell by handling PrepareViewStyleInfo event. Please refer the code snippet below :

private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
if (e.RowIndex == 1 && e.ColIndex == 1)
e.Style.CellType = "ComboBox";
e.Style.BackColor = Color.Red ;
e.Style.ChoiceList = item2;

You can set your choicelist in your CurrentCellChanged as follows:

StringCollection item2;
void gridDataBoundGrid1_CurrentCellChanged(object sender, EventArgs e)
item2 = new StringCollection();

Please refer the sample in the below link that illustrate the above.


Please let me know if this is not what you needed.



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