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.

Drop down list in the datagrid.

Thread ID:

Created:

Updated:

Platform:

Replies:

61377 May 24,2007 08:41 AM May 24,2007 10:50 AM Windows Forms 1
loading
Tags: GridControl
aa
Asked On May 24, 2007 08:41 AM

hi,

i've a datagrid(GDBG) colummn which celltype is a "GridListControl".

how to i get the selected value and store the value to another column?

Is there any event like "SelectionChangeCommitted"?






haneefm [Syncfusion]
Replied On May 24, 2007 10:50 AM

Hi Lim,

You can access the GridDropDownGridListControlCellRenderer and subscribe to the SelectedValueChanged event which, is analogous to the SelectionChangeCommitted event. Below is a code snippet

//Form Load....
GridDropDownGridListControlCellRenderer cr = this.grid.CellRenderers["GridListControl"] as GridDropDownGridListControlCellRenderer;
if( cr != null)
{
cr.ListBoxPart.SelectedValueChanged+=new EventHandler(ListBoxPart_SelectedValueChanged);
}

private void ListBoxPart_SelectedValueChanged(object sender, EventArgs e)
{
ListBox list = sender as ListBox;
DataRowView row = list.SelectedItem as DataRowView;
if( row != null)
Console.WriteLine(row[1]);
}

Best regards,
Haneef

CONFIRMATION

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.

;