The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator Syncfusion Team 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
BCBrian CorleyJuly 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?
BCBrian CorleyJuly 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{}
}
BCBrian CorleyJuly 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{}
}