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.

GridComboBoxCellRenderer SelectedItem not changed?

Thread ID:

Created:

Updated:

Platform:

Replies:

59947 Apr 25,2007 04:20 AM Apr 26,2007 11:32 AM Windows Forms 2
loading
Tags: GridControl
Hans Dampf
Asked On April 25, 2007 04:20 AM

Hi,

we have a GGC which is bound to our business object. We have made a custom cell renderer to handle that object. The value is shown in the cell (because of the ToString() method). When I click on the drop down button I can see a list of supported values. After choosing a value, the cell appears empty. I have attached a sample where you can see that issue. It would be great if somebody can help me.

Cheers,
Al

DropDownBox.zip

Hans Dampf
Replied On April 26, 2007 02:09 AM

Hi,

I just wanna bring this thread up. Perhaps can somebody from syncfusion take a closer look at this issue?

Cheers,
Al

haneefm [Syncfusion]
Replied On April 26, 2007 11:32 AM

Hi Al,

You would have to override the ListBoxMouseUp method in a MyComboBoxCellRenderer class and set the selected value of the ListBox to cell using the below code.

protected override void ListBoxMouseUp(object sender, MouseEventArgs e)
{
MyObject curobj = new MyObject();
if( ListBoxPart.SelectedItem != null )
curobj.Value = ListBoxPart.SelectedItem.ToString() ;
Grid.Model[RowIndex, ColIndex].CellValue = curobj;
base.ListBoxMouseUp(sender, e);
}

Please refer to modified sample for more details.
ModifiedDropDownBox.zip

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.

;