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. Help regarding Checkbox event in datagridview

Help regarding Checkbox event in datagridview

Scheduled Pinned Locked Moved C#
wpfwcfhelptutorial
3 Posts 2 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.
  • M Offline
    M Offline
    mrcsn
    wrote on last edited by
    #1

    Hi All, in one (windows)form im binding the table to datagridview ,with check box column . if i click check box in one column , i want to display the content of that row in a new window ... in which event we have to write the code .., give me samples or tell me how to write ..!! thanks .

    C 1 Reply Last reply
    0
    • M mrcsn

      Hi All, in one (windows)form im binding the table to datagridview ,with check box column . if i click check box in one column , i want to display the content of that row in a new window ... in which event we have to write the code .., give me samples or tell me how to write ..!! thanks .

      C Offline
      C Offline
      C1AllenS
      wrote on last edited by
      #2

      Hi, You can use the CellEndEdit() event for DataGridView. You can probably take a look at the given code. Lets say we have a grid with first column as boolen column. You have another form2 with a property GetDataRow() to receive the DataGridView row. In this scenario, you can put the following code under CellEndEdit() event. if (e.ColumnIndex == 0) { DataRow dr; if (DataGridView1(e.ColumnIndex, e.RowIndex).Value == false) { Form2 frm = new Form2(); frm.GetDataRow = DataGridView1.Rows[e.RowIndex];//Property on Form2 which accepts the row frm.ShowDialog(); } } I hope this helps. Regards,

      Allen Smith Software Engineer ComponentOne LLC www.componentone.com

      M 1 Reply Last reply
      0
      • C C1AllenS

        Hi, You can use the CellEndEdit() event for DataGridView. You can probably take a look at the given code. Lets say we have a grid with first column as boolen column. You have another form2 with a property GetDataRow() to receive the DataGridView row. In this scenario, you can put the following code under CellEndEdit() event. if (e.ColumnIndex == 0) { DataRow dr; if (DataGridView1(e.ColumnIndex, e.RowIndex).Value == false) { Form2 frm = new Form2(); frm.GetDataRow = DataGridView1.Rows[e.RowIndex];//Property on Form2 which accepts the row frm.ShowDialog(); } } I hope this helps. Regards,

        Allen Smith Software Engineer ComponentOne LLC www.componentone.com

        M Offline
        M Offline
        mrcsn
        wrote on last edited by
        #3

        thanks , i will try this code regards, csn. :)

        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