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. question in the use of the datagrid

question in the use of the datagrid

Scheduled Pinned Locked Moved Visual Basic
csstutorialquestion
7 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.
  • H Offline
    H Offline
    Hasan Jaffal
    wrote on last edited by
    #1

    Hello how to oblige, the user, to select all the row in the datagrid, not a unique cell, so i want to make the grid view like the listview.

    T 1 Reply Last reply
    0
    • H Hasan Jaffal

      Hello how to oblige, the user, to select all the row in the datagrid, not a unique cell, so i want to make the grid view like the listview.

      T Offline
      T Offline
      Tamimi Code
      wrote on last edited by
      #2

      hi try this: put this line in the dataGrid.CurrentCellChanged event dataGrid.Select(grdUser.CurrentCell.RowNumber)

      Tamimi - Code

      H 1 Reply Last reply
      0
      • T Tamimi Code

        hi try this: put this line in the dataGrid.CurrentCellChanged event dataGrid.Select(grdUser.CurrentCell.RowNumber)

        Tamimi - Code

        H Offline
        H Offline
        Hasan Jaffal
        wrote on last edited by
        #3

        yes man i did that but the problem was that the current cell is selected too, what i need is to select only the row u get it ?

        T 1 Reply Last reply
        0
        • H Hasan Jaffal

          yes man i did that but the problem was that the current cell is selected too, what i need is to select only the row u get it ?

          T Offline
          T Offline
          Tamimi Code
          wrote on last edited by
          #4

          hi try this: grid.Select(grid.CurrentCell.RowNumber) Dim gc As New DataGridCell(grid.CurrentCell.RowNumber, -1) grid.CurrentCell = gc

          Tamimi - Code

          H 1 Reply Last reply
          0
          • T Tamimi Code

            hi try this: grid.Select(grid.CurrentCell.RowNumber) Dim gc As New DataGridCell(grid.CurrentCell.RowNumber, -1) grid.CurrentCell = gc

            Tamimi - Code

            H Offline
            H Offline
            Hasan Jaffal
            wrote on last edited by
            #5

            this is the method i think but in this way the cell of the column 0 is selected not the -1 and if i made 2 the cell 1 is the selected cell - ihave 2 columns : 0 and 1 but my friend if u can answare this question the situation will be better : how to make sorting when the user clicks on the header of a listview i made a list view of many columns but i want to make sorting of the data by columns when he clicks the header of column i - the data in the listview should be sorted by this column - i.

            T 1 Reply Last reply
            0
            • H Hasan Jaffal

              this is the method i think but in this way the cell of the column 0 is selected not the -1 and if i made 2 the cell 1 is the selected cell - ihave 2 columns : 0 and 1 but my friend if u can answare this question the situation will be better : how to make sorting when the user clicks on the header of a listview i made a list view of many columns but i want to make sorting of the data by columns when he clicks the header of column i - the data in the listview should be sorted by this column - i.

              T Offline
              T Offline
              Tamimi Code
              wrote on last edited by
              #6

              hi hasan i don't think that i understode you last message !!!!!!!!!! and i test the code in my last msg , and its work correctly , make sure that you are putting the code in the CurrentCellChanged excuse me i never did sorting with a listview

              Tamimi - Code

              H 1 Reply Last reply
              0
              • T Tamimi Code

                hi hasan i don't think that i understode you last message !!!!!!!!!! and i test the code in my last msg , and its work correctly , make sure that you are putting the code in the CurrentCellChanged excuse me i never did sorting with a listview

                Tamimi - Code

                H Offline
                H Offline
                Hasan Jaffal
                wrote on last edited by
                #7

                thanks man i solved the problem thanks alot ;)

                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