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.

GridListControl values

Thread ID:





56283 Feb 12,2007 07:45 PM Feb 14,2007 05:28 PM Windows Forms 4
Tags: Grouping
Kaveh Eshgi
Asked On February 12, 2007 07:45 PM

I am populating a dropdown in a cell by setting the datasource to a dynamically generated datatable.

The datatable contains two columns: NAME and NUMBER. The ValueMember and DisplayMember are both set to the NUMBER column and the NAME column is hidden.

When the dropdown value is changed I would like to access the value of the NAME column. How can I do this?

Thank you!

Administrator [Syncfusion]
Replied On February 13, 2007 10:28 AM

Hi Kav,

One way you can do this by using TableControlCurrentCellCloseDropDown event of the grid and get the value of selected item using theRenderer.ListControlPart.SelectedItem. Here is a code snippet

private void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
GridDropDownGridListControlCellRenderer cr = e.TableControl.CurrentCell.Renderer as GridDropDownGridListControlCellRenderer;
if( cr != null)
DataRowView drv = cr.ListControlPart.SelectedItem as DataRowView;
if( drv != null )
Console.WriteLine("Slected Name >>> " + drv["Name"]);

Best regards,

Administrator [Syncfusion]
Replied On February 13, 2007 04:08 PM

Thank you for the quick solution!

However, now I am facing a different problem where the dropdown doesnt show up on the first click. But the second and consecutive clicks work fine.

This is what I have for the event:

static void gridAsos_TableControlCurrentCellShowingDropDown(object sender, GridTableControlCurrentCellShowingDropDownEventArgs e)
AsosDataset.AsosRogTableDataTable asosRogDT = new AsosDataset.AsosRogTableDataTable();
GridGroupingControl ggc = sender as GridGroupingControl;
GridDropDownGridListControlCellRenderer cr = e.TableControl.CurrentCell.Renderer as GridDropDownGridListControlCellRenderer;
Record currentRecord = e.TableControl.Table.CurrentRecord as Record;

cr.ListControlPart.ShowColumnHeader = false;
cr.ListControlPart.Grid.Cols.Hidden[2] = true;
int dpac = (int)currentRecord.GetValue("BITM_NUMB");

ggc.TableDescriptor.Columns["DSD_ROG_NUMB"].Appearance.AnyRecordFieldCell.DataSource = DSDAsosDAO.GetRogList(dpac);

Administrator [Syncfusion]
Replied On February 13, 2007 04:10 PM

Sorry forgot to log in!

Administrator [Syncfusion]
Replied On February 14, 2007 05:28 PM

Hi Kav,

Sorry for the delay in updating you.

We were not able to reproduce the issue here. Is it possible for you to upload us a sample or modify the any of our browser sample to reproduce the issue here? This will help us to analyse the issue further.

Thanks for your patience.

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.

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.