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
235
Add a blank oder emty Row in a UltraComboEditor with a DataSource
posted

Hi,

is it possible to add a blank row into a UltraComboEditor (DropDownStyle = DropDownList) wiht a DataSource?

Greetz,

Benny

  • 20872
    Offline posted

    Hello Benny,

    We are still following this forum thread.

    Please feel free to let us know if you still have any questions with this matter.

    Thanks for choosing Infragistics.

  • 20872
    Offline posted

    Hello Benny,

    If you are using a dataTable with a single column, you would be able to add an "empty" row depending on the dataType of the column. If this is a string column, than something like this would work:

     DataTable dt = new DataTable();
     dt.Columns.Add("New",typeof(string));
     dt.Rows.Add("1");
     dt.Rows.Add(""); //here would be your "empty row"
    dt.Rows.Add("2");
    ultraComboEditor1.DataSource = dt.DefaultView;
    ultraComboEditor1.DropDownStyle = DropDownStyle.DropDownList;

    If you have different requirements please do not hesitate to contact us.

  • 71886
    Offline posted

    Hello Benny,

    It seems to me that you need the 'UltraCombo' control. The ComboEditor does not drop grid, it does not have a layout, therefore it does not have rows in the meaning of grid rows. The combo has items. Another thing - what do you need this blank row for? I believe that you are looking for the TemplateAddRow functionality which is basically a blank row, right, with the ability to be added by the user to the control and the underlying datasource. Please take a look at the combo control.

    If you have any particular question I will be glad to assist you further!