Hello there.
My question is simple for U, but It's my second week using Infragistics Components.
How do I do to add new values in the UltraCombo.
Thanks
Hello laurent,
if you need to add a new row in the drop down list of the combo, i personaly add it to the DataScoure (DataSet, List<T>, etc)
for DataSet:
DataSet ds = (DataSet) this.myCombo.DataSource;
DataRow dr = ds.Tables[0].NewRow();
dr["MyValueColumn"] = 1;
dr["MyTextColumn"] = "Ne row Added";
EDIT: oups, didn't add the row to the DataSet.
ds.Tables[0].Rows.Add(dr);
for List<T>:
List<T> dl= (List<T>) this.myCombo.DataSource;
T newRow = new T ();
dl.Add(newRow);
* change T witht he list type ex(customer,Invoice, etc).
Hope that helped.
Nassos
I've a problem (my code is in VB)
Public Sub AddItem(ByVal Item As String)
Dim ds As DataSet = MyBase.DataSourceDim dr As DataRow = ds.Tables(0).NewRowds.Tables(0).Rows.Add(dr)dr(0) = "1"dr(1) = "New Item"
Can't convert from object to Dataset.