[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Getting highlighted rows from datagrid in windows form.

Posted on 2005-04-05
3
Medium Priority
?
287 Views
Last Modified: 2010-04-23
Hi experts how can i get row numbers of all the highlighted rows
in datagrid control which is on windows form?


0
Comment
Question by:LorneBackler
3 Comments
 
LVL 9

Expert Comment

by:checoo
ID: 13713716
0
 
LVL 14

Accepted Solution

by:
amyhxu earned 2000 total points
ID: 13713802
If your datasource of the datagrid is datatable:

Dim rowNos As New ArrayList()

Dim i As Integer
For i = 0 to myDataSet.Tables("myTable").Rows.Count - 1
        If DataGrid1.IsSelected(i) Then
                    rowNos.Add(i)
        End If
End Next
 
0
 

Author Comment

by:LorneBackler
ID: 13717517
thanks s lot  Amyhxu


it work fine!
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question