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. DataGrid in .Net

DataGrid in .Net

Scheduled Pinned Locked Moved Visual Basic
csharpasp-nettutoriallearning
5 Posts 3 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.
  • B Offline
    B Offline
    Britnt7
    wrote on last edited by
    #1

    I was able to load the datagrid correctly and fill it. What I am trying now to accomplish is how to highlight a whole row when I user either tabs down or clicks the row. As of now it highlights just one column of the row. I want to be able to highlight the whole row and have a user click the row to get the info the user is requesting. Thanks:) Beginner in ASP.Net and VB.Net

    A P 2 Replies Last reply
    0
    • B Britnt7

      I was able to load the datagrid correctly and fill it. What I am trying now to accomplish is how to highlight a whole row when I user either tabs down or clicks the row. As of now it highlights just one column of the row. I want to be able to highlight the whole row and have a user click the row to get the info the user is requesting. Thanks:) Beginner in ASP.Net and VB.Net

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

      .NET Framework Class Library DataGrid.Select Method (Int32) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsDataGridClassSelectTopic1.asp

      B 1 Reply Last reply
      0
      • A Anonymous

        .NET Framework Class Library DataGrid.Select Method (Int32) http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsDataGridClassSelectTopic1.asp

        B Offline
        B Offline
        Britnt7
        wrote on last edited by
        #3

        That is the right track but if a user clicks on (row 1 column 3) then all the data for (row 1 column 1) and (row 1 column 2) disappears and the whole row is highlighted. I have seen this done in programs so I know its possible. Right now my rows alternate colors with light blue and baby blue. When a user selects a row they want to view, then I want to highlight that row to stand out like with a yellow or even a darker blue to make it look different from the rest. Thanks Beginner in ASP.Net and VB.Net

        A 1 Reply Last reply
        0
        • B Britnt7

          That is the right track but if a user clicks on (row 1 column 3) then all the data for (row 1 column 1) and (row 1 column 2) disappears and the whole row is highlighted. I have seen this done in programs so I know its possible. Right now my rows alternate colors with light blue and baby blue. When a user selects a row they want to view, then I want to highlight that row to stand out like with a yellow or even a darker blue to make it look different from the rest. Thanks Beginner in ASP.Net and VB.Net

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

          Highlight an Entire Row in VB.NET WinForms DataGrid description: http://www.freevbcode.com/ShowCode.asp?ID=5746 source: http://www.freevbcode.com/source/HighlightingRowInDataGrid.zip

          1 Reply Last reply
          0
          • B Britnt7

            I was able to load the datagrid correctly and fill it. What I am trying now to accomplish is how to highlight a whole row when I user either tabs down or clicks the row. As of now it highlights just one column of the row. I want to be able to highlight the whole row and have a user click the row to get the info the user is requesting. Thanks:) Beginner in ASP.Net and VB.Net

            P Offline
            P Offline
            Purple Monk
            wrote on last edited by
            #5

            you've probably sorted it now but a really simple way would be Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged Dim oCell As DataGridCell oCell = DataGrid1.CurrentCell Dim lRowNum As Long lRowNum = oCell.RowNumber With DataGrid1 .Select(lRowNum) End With End Sub "If i was king cigarettes would be free."

            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