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

GDBG / DropDownFormCell Display

Thread ID:





70910 Jan 8,2008 09:51 PM UTC Jan 9,2008 11:04 PM UTC WinForms 1
Tags: GridControl
Kenneth Johnson
Asked On January 8, 2008 09:51 PM UTC

I have created a DropDownFormCell control and defined a column in a GDBG to be this control. The DataSource is set to a DataView of a table that has an Id and a Description column. The DisplayMember is set to Description and the ValueMember is set to Id. When the user makes a selection in the DropDownForm, the grids CellValue member is set to the selected Id. After the form is gone, the numeric Id is displayed in the cell instead of the description. Any thoughts on what I may have missed to display the description?

haneefm [Syncfusion]
Replied On January 9, 2008 11:04 PM UTC

Hi Ken,

You can try setting the gridcell in the OnButtonClicked method of DropDownFormCellRenderer class. Below are the codes:

public class DropDownFormCellRenderer: GridStaticCellRenderer

protected override void OnButtonClicked(int rowIndex, int colIndex, int button)
this.Grid.CurrentCell.MoveTo(rowIndex, colIndex);
//Console.WriteLine("clicked ({0},{1})", rowIndex, colIndex);

this.ddForm.SetValuesFromString(this.Grid.Model[rowIndex, colIndex].Text);
Rectangle rect = this.Grid.RangeInfoToRectangle(GridRangeInfo.Cell(rowIndex, colIndex));

this.ddForm.Location = this.Grid.PointToScreen(new Point(rect.Left, rect.Bottom));

if(this.ddForm.ShowDialog() == DialogResult.OK)
this.Grid.Model[rowIndex, colIndex].Text = "Your DescriptionText Here";
//base.OnButtonClicked (rowIndex, colIndex, button);

Best regards,


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