Click here to Skip to main content
15,898,938 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to add user data to a file on a web site Pin
Dave Kreskowiak27-Feb-09 1:47
mveDave Kreskowiak27-Feb-09 1:47 
GeneralRe: How to add user data to a file on a web site Pin
GTVic27-Feb-09 7:06
GTVic27-Feb-09 7:06 
GeneralRe: How to add user data to a file on a web site Pin
Dave Kreskowiak27-Feb-09 7:43
mveDave Kreskowiak27-Feb-09 7:43 
QuestionWindows explorer automation to create folders, and execute right click in windows explorer Pin
LFlindall26-Feb-09 10:10
LFlindall26-Feb-09 10:10 
AnswerRe: Windows explorer automation to create folders, and execute right click in windows explorer Pin
Dave Kreskowiak27-Feb-09 1:45
mveDave Kreskowiak27-Feb-09 1:45 
GeneralRe: Windows explorer automation to create folders, and execute right click in windows explorer Pin
LFlindall27-Feb-09 2:52
LFlindall27-Feb-09 2:52 
GeneralRe: Windows explorer automation to create folders, and execute right click in windows explorer Pin
Dave Kreskowiak27-Feb-09 7:45
mveDave Kreskowiak27-Feb-09 7:45 
QuestionHow can I show group headers in listview in runtime? Pin
JUNEYT26-Feb-09 8:53
JUNEYT26-Feb-09 8:53 
Hi,

I have read all items from one listview and I have stored this in another listview. However I want to use one item as group name in 2nd listview. I am able to show all items in 2nd listview but no group headers. I wonder why groups doesn't show up in 2nd listview. Where do I make mistake? All the items are getting listed under default group header.

Thanks.


Private Sub BasketOnCounter()

        Dim LCounter As Int32 = 0
        Dim Found As Boolean = False

        ListView1.BeginUpdate()

        'Here we create groups with Artist names

        For Each BasketItem As ListViewItem In Form1.ListView6.Items

            Found = False
            If ListView1.Groups.Count > 0 Then

                For Each ArtistItem As ListViewGroup In ListView1.Groups

                    If ArtistItem.Header = BasketItem.SubItems(0).Text Then
                        Found = True
                        Exit For
                    End If

                Next

            End If

            If Found = False Then

                Dim SetGroupName As New ListViewGroup


                SetGroupName.Header = BasketItem.SubItems(0).Text
                SetGroupName.HeaderAlignment = HorizontalAlignment.Left

                ListView1.Groups.Add(SetGroupName)

                LCounter += 1
            End If

        Next

        'Here we add items in listview

        LCounter = 0
        For Each BasketItem As ListViewItem In Form1.ListView6.Items

            Try
                ListView1.Items.Add(BasketItem.SubItems(1).Text)
                ListView1.Items(LCounter).SubItems.Add(BasketItem.SubItems(3).Text)
                ListView1.Items(LCounter).SubItems.Add(BasketItem.SubItems(2).Text)
                ListView1.Items(LCounter).Group = ListView1.Groups(BasketItem.SubItems(0).Text)

'When I enable the following line the VS2008 is crashing.

                ListView1.Groups(BasketItem.SubItems(0).Text).Items.Add(ListView1.Items(LCounter)) here 

            Catch ex As Exception
                MsgBox(ex.ToString & " " & BasketItem.SubItems(0).Text)
            End Try

            LCounter += 1
        Next

        ListView1.EndUpdate()
    End Sub


What a curious mind needs to discover knowledge is noting else than a pin-hole.


AnswerRe: How can I show group headers in listview in runtime? Pin
Dave Kreskowiak27-Feb-09 1:39
mveDave Kreskowiak27-Feb-09 1:39 
GeneralRe: How can I show group headers in listview in runtime? Pin
JUNEYT27-Feb-09 2:03
JUNEYT27-Feb-09 2:03 
QuestionLoop Trouble Pin
shawndeprey26-Feb-09 7:04
shawndeprey26-Feb-09 7:04 
GeneralRe: Loop Trouble Pin
Luc Pattyn26-Feb-09 8:08
sitebuilderLuc Pattyn26-Feb-09 8:08 
GeneralRe: Loop Trouble Pin
shawndeprey26-Feb-09 8:38
shawndeprey26-Feb-09 8:38 
GeneralRe: Loop Trouble Pin
shawndeprey26-Feb-09 10:18
shawndeprey26-Feb-09 10:18 
QuestionNeed Some Information Pin
wr302826-Feb-09 6:56
wr302826-Feb-09 6:56 
AnswerRe: Need Some Information Pin
Steven J Jowett26-Feb-09 9:38
Steven J Jowett26-Feb-09 9:38 
GeneralRe: Need Some Information Pin
wr30289-Mar-09 19:04
wr30289-Mar-09 19:04 
GeneralRe: Need Some Information Pin
Steven J Jowett9-Mar-09 23:17
Steven J Jowett9-Mar-09 23:17 
AnswerRe: Need Some Information Pin
Eddy Vluggen26-Feb-09 21:43
professionalEddy Vluggen26-Feb-09 21:43 
QuestionHow to print the datagridview Pin
Jagz W26-Feb-09 6:16
professionalJagz W26-Feb-09 6:16 
AnswerRe: How to print the datagridview Pin
Rupesh Kumar Swami26-Feb-09 19:23
Rupesh Kumar Swami26-Feb-09 19:23 
GeneralRe: How to print the datagridview Pin
Jagz W26-Feb-09 20:02
professionalJagz W26-Feb-09 20:02 
GeneralRe: How to print the datagridview Pin
dan!sh 26-Feb-09 20:46
professional dan!sh 26-Feb-09 20:46 
GeneralRe: How to print the datagridview Pin
Dave Kreskowiak27-Feb-09 1:38
mveDave Kreskowiak27-Feb-09 1:38 
GeneralRe: How to print the datagridview Pin
Jagz W28-Feb-09 7:21
professionalJagz W28-Feb-09 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.