combobox and WebService dataSet

I have a WebService in wich i have DataSet with one table named "Predmet". So I wrote a method like this:

public DataSet1 VratiDataSet()
{
DataSet1 faca =new DataSet1();
return faca;
}

in my Win Aplication i have binding combo box with my data table like this:

private void Form1_Load(object sender, EventArgs e)
{
DataSet mojDataSet = mojServis.VratiDataSet();
comboBox1.DataSource = mojDataSet.Tables["Predmet"];
comboBox1.DisplayMember = "Naziv";
comboBox1.ValueMember = "ID_Predmet";

}

but, i get the "" in combobox,

where is my mistake

Thanx in advance
Oga


Answer this question

combobox and WebService dataSet

  • mf32000_9

    i think , in the above mentioned code, u didn't populate your dataset with data, thats why it is showing nothing



  • Keph

    No Problem :)

    Mark the post as answered



  • PsilentKnight

    SOLVED,


    sorry:)

  • combobox and WebService dataSet