Search results for query: *

  1. P

    SelectedValue problem

    Still no success. And this problem is starting to spread through the new forms added to my project...it really sux. Anyway, thank you TPM, for your advice and patience and if anyone could figure out, what's going on there, it would be greatly appreciated.
  2. P

    SelectedValue problem

    With tmp.Rows.InsertAt(row, 0) I'm trying to insert an empty item at the begining of the combo list, after the data binding's been created. The combination of putting the empty item at the position 0 and subsequently setting the SelectedValue to 1 seems to trouble vb.net and causes the error...
  3. P

    SelectedValue problem

    I found also another thing. If I change the statement tmp.Rows.InsertAt(row, 0) to tmp.Rows.InsertAt(row, 1) everything works fine, i.e. every position is OK except for the topmost one.
  4. P

    SelectedValue problem

    I have a dozen comboboxes bound like this accross the whole project, but this is the only one causing trouble. I tried to use a datatable with no success - here's the code: Dim tmp as new DataTable m_SqlCommand.CommandText = "SELECT tbl.Name, tbl.Id FROM tbl;" m_DataAdapter.SelectCommand =...
  5. P

    SelectedValue problem

    I've tried that already - didn't help. It looks like I'd have to find another way around without using this property.
  6. P

    SelectedValue problem

    Yeah, it's an int. I tried to delete the whole table and recreate it. After I'd inserted the first three rows, everything was fine. After inserting the fourth row, the lousy error came up again.
  7. P

    SelectedValue problem

    No, I don't have any event handler for the combo defined. I found out the following: if I delete the row with Id=5 from the database table, everything works fine. If I then add a new row to the table, the problem occurs again no matter what kind of data it contains.
  8. P

    SelectedValue problem

    I was doing basically the same thing, but I was setting r.item("ID") to DBNull.Value. I tried it with -1, but still no success. This is the whole code: m_SqlCommand.CommandText = "SELECT tbl.Name, tbl.Id FROM tbl;" m_DataAdapter.SelectCommand = m_SqlCommand m_DataAdapter.Fill(m_DataSetSys...
  9. P

    SelectedValue problem

    It's just a simple statement: Combo1.SelectedValue = 1 Strange thing is that every other value works fine:/
  10. P

    SelectedValue problem

    I'm using a combobox with the property DropDownStyle set to DropDownList. The combo is data-bound to a dataset with two colums: ID, Name and it contains the following records: ID Name 1 A 2 B 3 C 5 D The DisplayMember property is mapped to "Name" column and the ValueMember property...
Back
Top