ComboBox, DataViewManager Problem

i have created a form with a comboBox, and i am filling comboBox with database column
using dataviewmanager

when i click on button it fills comboBox with column which i have specified

I wanted that the value be stored on 1st index have to be "" (empty string)

Could you help me! please.
Thanks




Answer this question

ComboBox, DataViewManager Problem

  • TheMaj0r

    Create a new datarow with a empty string. Insert it at postion in the datatable


  • HowardRichards

    You should have a  datatable in the myDataSet, e.g myDataTable
    myDataTable.Rows.Add("");



  • Scott ODonnell

    Thanks you very very much,

    I got success

    myDataSet.Tables[0].Rows.Add(0);

    Thanks

     

    Could you solve this problem

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=937288&SiteID=1



  • Endo64

    Wang Chi wrote:

    You should have a datatable in the myDataSet, e.g myDataTable
    myDataTable.Rows.Add("");

    How to store that empty row on 1st position

    Thanks



  • rahulsk1947

    I Have filled Combobox using following code, so how to modify these code for insertion empty dataRow, could you show me any alternative or modify following code

    thanks

    DataViewManager dviewmanager = myDataSet.DefaultViewManager;

    this.txtCourse.DataSource = dviewmanager;

    this.txtCourse.DisplayMember = "course.course_name";



  • ComboBox, DataViewManager Problem