Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Adding simple data in UltraCombo
posted

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

Parents
No Data
Reply
  • 280
    posted

     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 

Children