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. Image for the cookie policy date
close icon

GridComboBoxCellRenderer SelectedItem not changed?

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

2 Replies

HD Hans Dampf April 26, 2007 06:09 AM UTC

Hi,

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

Cheers,
Al


HA haneefm Syncfusion Team April 26, 2007 03:32 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon