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. Visual Basic
  4. button on a datagrid cell

button on a datagrid cell

Scheduled Pinned Locked Moved Visual Basic
csharphelp
4 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.
  • C Offline
    C Offline
    cutequencher
    wrote on last edited by
    #1

    i want to make a cell of a datagrid as a button... i am using .NewRow predefined function to add a new row.. i am not using any data adapter neither data set... i am adding new row straight to the datagrid... what should i need to do... please help me... i am using vb.net 2002. if ever, much better if you can give me sample codes. thanks!

    R 1 Reply Last reply
    0
    • C cutequencher

      i want to make a cell of a datagrid as a button... i am using .NewRow predefined function to add a new row.. i am not using any data adapter neither data set... i am adding new row straight to the datagrid... what should i need to do... please help me... i am using vb.net 2002. if ever, much better if you can give me sample codes. thanks!

      R Offline
      R Offline
      remarkpk11
      wrote on last edited by
      #2

      Depending on where the new row is added, you can use a RowDoubleClick or Click event to process the data in that field. For example, if the row is added to the end of the data grid, you can use a collection of the rows and access the last element of the collection array directly. Then, you could systematically go through the cells you want to extract the data out of by passing the column name to one of the functions provided by the data grid class (something like SelectedIndex() or Index() and then you pass the name of the column). Hope this helps.

      C 1 Reply Last reply
      0
      • R remarkpk11

        Depending on where the new row is added, you can use a RowDoubleClick or Click event to process the data in that field. For example, if the row is added to the end of the data grid, you can use a collection of the rows and access the last element of the collection array directly. Then, you could systematically go through the cells you want to extract the data out of by passing the column name to one of the functions provided by the data grid class (something like SelectedIndex() or Index() and then you pass the name of the column). Hope this helps.

        C Offline
        C Offline
        cutequencher
        wrote on last edited by
        #3

        i already know about that... but i really need to put a button in a cell. but thanx anyway...

        R 1 Reply Last reply
        0
        • C cutequencher

          i already know about that... but i really need to put a button in a cell. but thanx anyway...

          R Offline
          R Offline
          remarkpk11
          wrote on last edited by
          #4

          Oh, sorry. Didn't understand what you meant. Good luck!

          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