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

changing available values in combobox column for a selected row in the GGC

I am using the GGC and have a combobox style column. The values are not the same for every given row in the grid. I need the ability to change the values in the datasource the combobox column is bound to as the user selects new rows.

4 Replies

AD Administrator Syncfusion Team July 28, 2005 11:52 AM

You can try using TableControlCurrentCellShowingDropDown to dynamically set the datasource of the dropdown. Here is a forum thread discussing this issue. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=29623


BC Brian Corley July 28, 2005 12:49 PM

I now have this working (kind of). in the grid_TableControlCurrentCellCloseDropDown method I am setting the value on my internal object but until I actually click off the row or select a new row, I don''t see the new value. Is there a way I can force the cell to update the text from the newly selected drop down value when grid_TableControlCurrentCellCloseDropDown is called?


BC Brian Corley July 28, 2005 12:57 PM

here is what I am doing: private void grid_TableControlCurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPopupClosedEventArgs e) { try { GridCurrentCell cc = e.TableControl.CurrentCell; if(cc.Renderer is GridComboBoxCellRenderer) { //get the list of brokers for this market MarketW mw = (MarketW)currentRec.GetData(); brokers = proc.GetBrokersForLocation(this.sub,mw.GetInternalMarket().Location); GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; foreach(People p in brokers) { if(p.PeopleSkey == int.Parse(cr.ControlValue.ToString())) { mw.GetInternalMarket().People = p; cc.EndEdit(); break; } } } } catch{} }


BC Brian Corley July 28, 2005 01:04 PM

Figured it out: private void grid_TableControlCurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPopupClosedEventArgs e) { try { GridCurrentCell cc = e.TableControl.CurrentCell; if(cc.Renderer is GridComboBoxCellRenderer) { //get the list of brokers for this market MarketW mw = (MarketW)currentRec.GetData(); brokers = proc.GetBrokersForLocation(this.sub,mw.GetInternalMarket().Location); GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; foreach(People p in brokers) { if(p.PeopleSkey == int.Parse(cr.ControlValue.ToString())) { mw.GetInternalMarket().People = p; cc.EndEdit(); cc.Refresh(); break; } } } } catch{} }

Loader.
Live Chat Icon For mobile
Up arrow icon