![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | VB.Net progam the selecting of a row of a DataGridView On 21 Jul 2008 17:57:43 GMT, "News.Individual.NET" <josephoget@xxxxxx> wrote: Quote: >Hi all, > >I can detect the active row (iRowIndex: see below please) and do whatever I >want, but I do not seem to be able to set a row to be selected. > >How can I do that in vb.Net? > >Private Sub DataGridView1_MouseDown(etc..... > >Dim btnLeft = Windows.Forms.MouseButtons.Left > >If e.Button = btnLeft Then > > Dim hit As DataGridView.HitTestInfo = DataGridView1.HitTest(e.X, e.Y) > If hit.Type = DataGridViewHitTestType.Cell Then > clickedCell = DataGridView1.Rows(hit.RowIndex).Cells(hit.ColumnIndex) > iRowIndex = CInt(hit.RowIndex) > etc... > |
My System Specs![]() |
| | #2 (permalink) |
| | Re: VB.Net progam the selecting of a row of a DataGridView On 21 Jul 2008 17:57:43 GMT, "News.Individual.NET" <josephoget@xxxxxx> wrote: Quote: >Hi all, > >I can detect the active row (iRowIndex: see below please) and do whatever I >want, but I do not seem to be able to set a row to be selected. > >How can I do that in vb.Net? > >Private Sub DataGridView1_MouseDown(etc..... > >Dim btnLeft = Windows.Forms.MouseButtons.Left > >If e.Button = btnLeft Then > > Dim hit As DataGridView.HitTestInfo = DataGridView1.HitTest(e.X, e.Y) > If hit.Type = DataGridViewHitTestType.Cell Then > clickedCell = DataGridView1.Rows(hit.RowIndex).Cells(hit.ColumnIndex) > iRowIndex = CInt(hit.RowIndex) > etc... > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Photo Editing Progam in Vista? | Software | |||
| Missing Progam Name in Start/All Programs | Vista performance & maintenance | |||
| Progam for custom refresh rates ? | Software | |||
| What progam is used to open Vista Log files? | Vista General | |||
| can't log in, how to uninstall progam? | Vista installation & setup | |||