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.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

32376 Jul 28,2005 02:52 PM UTC Jul 28,2005 06:04 PM UTC Windows Forms 4
loading
Tags: GridControl
Brian Corley
Asked On July 28, 2005 02:52 PM UTC

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.

Administrator [Syncfusion]
Replied On July 28, 2005 04:52 PM UTC

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

Brian Corley
Replied On July 28, 2005 05:49 PM UTC

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?

Brian Corley
Replied On July 28, 2005 05:57 PM UTC

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{} }

Brian Corley
Replied On July 28, 2005 06:04 PM UTC

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{} }

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.

Warning Icon 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.Close Icon

;