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
J

jnallen

@jnallen
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • datagrid selected rows loop
    J jnallen

    I can't use DataGridRow due to the protection level. I did try this though, which works for a single selected row (now to iterate this through all the selected rows???): int delRow = (int)dataGrid.CurrentCell.Value; _connStr = this.getDBConnection("net"); SqlConnection conn = new SqlConnection(_connStr); string sql = "delete from gisLinkedDocument where LinkKey in (@delRow)"; SqlCommand cmd = new SqlCommand(sql, conn); SqlParameter parm = cmd.Parameters.Add("@delRow", SqlDbType.Int); parm.Value = delRow; try { conn.Open(); cmd.ExecuteNonQuery(); } catch { MessageBox.Show("The link was NOT deleted"); } finally { if (conn.State != ConnectionState.Closed) conn.Close(); }

    look out, noob wreck'n havoc

    C# database tutorial

  • datagrid selected rows loop
    J jnallen

    i need to get a cell value from each of the selected datagrid rows. i will then put these values in a t-sql delete from statement. i can't seem to find any clear direction on how to loop through a selected set in a datagrid and then get a particular cell value. any re-direction, or comments would be greatly appreciated.

    look out, noob wreck'n havoc

    C# database tutorial
  • Login

  • Don't have an account? Register

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