Hi,
I have a ultraComboEdtior of whose datsource I have set to a list of Location objects. I have set this combo box as the Editor component of a column in an ultragrid.
I have a method to add a new customer. In this method I get the datasource from the editor control (by first casting to ultracomboeditor, then to my list). I add the new customer. I see the count of the datasource go up by one. I do not see though the new customer when I drop down the list in the cell. What am I missing?
c = (ugReplicate.DisplayLayout.Bands[0].Columns["siteID"].EditorComponent as UltraComboEditor).DataSource as List<CSM.Location>;
c.Add(fl.SiteLocation);
Here is where I see the datsource go up by one (even on the first line if I hold my mouse over DataSource).
Thanks,
M.
Hello Michael,
Maybe one possible approach to solve your task could be if you call DataBind() method. For example:
private void ultraButton1_Click(object sender, EventArgs e)
{
i++;
List<string> list = (ultraGrid1.DisplayLayout.Bands[0].Columns[1].EditorComponent as UltraComboEditor).DataSource as List<string>;
list.Add("Item " + i.ToString());
(ultraGrid1.DisplayLayout.Bands[0].Columns[1].EditorComponent as UltraComboEditor).DataBind();
}
Please take a look on attached sample and video file for more details and if you have any questions, feel free to write me
Regards
Here is the sample