Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. C# 2005 - Datagrid and comboBoxes, How do I ... ?

C# 2005 - Datagrid and comboBoxes, How do I ... ?

Scheduled Pinned Locked Moved C#
questioncsharp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JC Carmo
    wrote on last edited by
    #1

    Hello everyone, I have a DataGridView in a windows form with three columns: Column1 is TipoComboBoxColumn Column2 is QuantidadeColumn Column3 is SementeComboBoxColumn I need the SementeComboBoxColumn to display values according to the value I select in the TipoComboBoxColumn. How do I go about accomplishing that? The code below works in part, BUT when I'm editing the value of SementeComboBoxColumn, the other values for the other rows in this column disappear. This is driving nuts! private void tabBAdetDataGridView_CellClick(object sender, DataGridViewCellEventArgs e) { if (tabBAdetDataGridView.Columns[e.ColumnIndex].Name == "EspecieComboBoxColumn") { this.tabSementesTableAdapter.FillByTipo(this.sascrDataSet.tabSementes, tabBAdetDataGridView.Rows[e.RowIndex].Cells["TipoComboBoxColumn"].Value.ToString()); this.EspecieComboBoxColumn.DataSource = this.tabSementesBindingSource; this.EspecieComboBoxColumn.DisplayMember = "Semente"; } else { this.tabSementesTableAdapter.Fill(this.sascrDataSet.tabSementes); this.EspecieComboBoxColumn.DataSource = this.tabSementesBindingSource; this.EspecieComboBoxColumn.DisplayMember = "Semente"; } } Thanks in advance, JC Carmo

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups