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. How to get cell containg Text from datagrid in Winforms

How to get cell containg Text from datagrid in Winforms

Scheduled Pinned Locked Moved C#
csharpwinformshelptutorial
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.
  • R Offline
    R Offline
    ranandbe
    wrote on last edited by
    #1

    Hai all, I have a problem datagrid in Winforms about getting the selected row containing cells value,I know this is very simple in web application but i am new for win application can you please give the idea. ranandbe

    A 1 Reply Last reply
    0
    • R ranandbe

      Hai all, I have a problem datagrid in Winforms about getting the selected row containing cells value,I know this is very simple in web application but i am new for win application can you please give the idea. ranandbe

      A Offline
      A Offline
      aruna_susee
      wrote on last edited by
      #2

      Hi, If u want each column value of selected row then loop it with ColumnNumber TextBox2.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, DataGrid1.CurrentCell.ColumnNumber)

      R 1 Reply Last reply
      0
      • A aruna_susee

        Hi, If u want each column value of selected row then loop it with ColumnNumber TextBox2.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, DataGrid1.CurrentCell.ColumnNumber)

        R Offline
        R Offline
        ranandbe
        wrote on last edited by
        #3

        :~ Hi thanks for reply, I can't get the Item property for that grid in Windows Forms Application, i thought you mentioned the web form grid control, is there any way to get web form grid control to win forms application. ranandbe

        A 1 Reply Last reply
        0
        • R ranandbe

          :~ Hi thanks for reply, I can't get the Item property for that grid in Windows Forms Application, i thought you mentioned the web form grid control, is there any way to get web form grid control to win forms application. ranandbe

          A Offline
          A Offline
          aruna_susee
          wrote on last edited by
          #4

          yes in windows application only u wil have item property check once again Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged TextBox2.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, DataGrid1.CurrentCell.ColumnNumber) End Sub

          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