Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[74] ListView Control

Last post 11-14-2007 10:00 PM by SeanH. 49 replies.
Page 3 of 4 (50 items) < Previous 1 2 3 4 Next >
Sort Posts: Previous Next
  • 09-15-2003 2:18 AM In reply to

    • numata
    • Not Ranked
    • Joined on 06-14-2003
    • Member
    • Points 225

    Listview to behave like listbox

    Hi,

    I am trying make listview perform like the listbox.

    In list box i usually assign a value to the data field so that when i need to retrieve the data from the search field i could simply pull the data from the listbox. Its like a key which cannot be seen on the screen.

    e.g. lstSearchResults.ItemData(lstSearchResults.ListCount - 1) = rsUser("tableID")

    Now i trying to apply the similar concept to the listview but aint sure on how to go about doing so. Any one have any idea on how to go about doing so or any refreshing ideas

    Thank You in advance





    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 09-15-2003 12:37 PM In reply to

    • sdornan
    • Not Ranked
    • Joined on 09-15-2003
    • New Member
    • Points 10

    Searching List View Control

    Help!
    I have a ListView control in my VB6 Form that is in report view and I am attempting to do a searh. I am able to find the ListItem I want, and even set the selected to true, but if the item is out of view on the listview, I cannot find a way to make the listview automatically scroll to that item.
    • Post Points: 0
  • 09-29-2003 4:38 AM In reply to

    ListView PrintDocument in VB.Net

    HI,

         I want to print listview control content using printdocument , printpreviewdialog in vb.net.
    how can i see the prerview of listview using printpreviewdialog?
    Through printpreviewdialog i want to take printout.

    i did like this..........

       Private Sub ButtonPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonPrint.Click
           PrintPreviewDialog1.Document = PrintDocument1
           PrintPreviewDialog1.FormBorderStyle = FormBorderStyle.Fixed3D
           PrintPreviewDialog1.SetBounds(ClientRectangle.X, ClientRectangle.Y,   ClientRectangle.Width + 50, ClientRectangle.Height + 50)
           PrintPreviewDialog1.PrintPreviewControl.Zoom = 1.0
           PrintPreviewDialog1.ShowDialog()
    End Sub

    Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
           Dim myPaintArgs As New PaintEventArgs(e.Graphics, New Rectangle(New Point(0, 0), Me.Size))
           Me.InvokePaint(ListView1, myPaintArgs)
       End Sub


    but it is not working. the balnk printpreviewdialog comming...
    please help me ...

    Thank you.
    • Post Points: 0
  • 10-29-2003 12:09 PM In reply to

    set View property of ListView to 'Details'
    • Post Points: 0
  • 02-01-2004 5:22 PM In reply to

    This one took me a while but it's as easy as one line of code.

    When setting the "selected" value to True:

    ListView1.SelectedItem.Selected = True

    add the following line of code right after:

    ListView1.SelectedItem.EnsureVisible

    remember to change "ListView1" to the name of your ListView control
    • Post Points: 0
  • 05-08-2004 3:19 PM In reply to

    This makes no sense.

    I'm having the same problem. There's no .Columns property/method (using .ColumnHeaders does the same thing) and no Details option under View.
    • Post Points: 0
  • 06-02-2004 7:27 AM In reply to

    I have a list viewcontrol in my application. Currently the user can the minimize the columnheader  width to zero. I want to restrict the user to minimize the column header to a particular point . How can this be achieved?

    Any replies would be appreciated. It is urgen
    -Thanks
    • Post Points: 0
  • 08-18-2004 1:45 AM In reply to

    Quote:
    I'm having the same problem. There's no .Columns property/method (using .ColumnHeaders does the same thing) and no Details option under View.


    i have never heard of this problem..
    you might want to check your virsion of VB or VS.
    i do believe i know that some commercial virsions (ones you get with books) don't let you make your own controls but I don't know about your situation buddy. I would try installing a different virsion unless you bought your virsion hehe. If you did purchase it, try contacting Microsoft.
    • Post Points: 0
  • 10-22-2004 6:16 PM In reply to

    Allow reordering?

    I need to know how to allow the rows to be reordered (drag and drop) in either this or (preferrably) a Listbox. I can make the columns reorder-able but that's no help. (I'm only even using one column.)
    • Post Points: 0
  • 05-17-2005 9:39 PM In reply to

    Error...?

    My version of MSVB6 does'nt allow me to use the code
    Code:
    ListView1.ListItems.Remove (ListView1.SelectedItem)

    (getting error).

    Looking at the syntax, the Remove-method requires an Index for the item to remove, but here an Item has been put as a param.
    So, I changed the code to:
    Code:
    ListView1.ListItems.Remove(ListView1.SelectedItem.Index)

    which worked!

    (sorry about the spelling etc. - I'm from Denmark!)

    Best regards, Jonas (aka. Juke)
    • Post Points: 0
  • 06-17-2005 4:58 AM In reply to

    • joconer
    • Not Ranked
    • Joined on 02-16-2005
    • New Member
    • Points 20

    listview problem


    hi......
    i have some question and need to solve immediatley ....
    i want to double click on listview and after that will show new form and what i click in listview will displayed on that's new form.


    can someone help me? please... please ... please

    sorry for bad english, i hope someone will understand what i want, thanks so much.......
    • Post Points: 0
  • 08-12-2005 6:29 PM In reply to

    • ortizsr
    • Not Ranked
    • Joined on 08-12-2005
    • New Member
    • Points 5

    Listview Turtorial

    Dear Sir:

    Your Tutorial on Listviews is very interesting, and I will learn something from it.  I am a VB6 Freshman, and have developed an Amortization program that is working well, but i decided to expand its features by incorporating the flexibility for the User to dictate when Extra Principal payment are to be made and in what amounts.

    I started using a Listview to draw the Payment numbers, and Dates (as started from a Monthview), and allow the User to then select in which  Payment numbers they will make an Extra Payment, and entered an amount which could vary from selection to selection of Payment numbers.

    The AMortziation program will be default schedule the amortization with ExtraPayments at zero, according to the number of Years (Term), and Periods of months in a year (Months).

    How do I draw these data from the FlexGrid to the Listview so that the User can checkmark his selections???

    • Post Points: 0
  • 10-06-2006 3:12 AM In reply to

    Re: [74] ListView Control

    I also get error when i tried the code above
    if you're having problem with that code try this one

    ListView1.ListItems.Remove (ListView1.SelectedItem.Index)
    this is the code i use and it worked!

    this site is really cool, i learn a lot







    • Post Points: 5
  • 11-08-2006 6:14 AM In reply to

    • clhug
    • Not Ranked
    • Joined on 11-08-2006
    • New Member
    • Points 5

    Re: [74] ListView Control -accessing items by key

    Okay, something I'm completely lost on and can't seem to find any info on.  If I assign a unique key to every item in the listview box with the add method, how do I later acess an item in the list by that key instead of by the index?  I see how to determine what the key is for an item (after I've referenced the item by index), but not how to directly reference an item by the key.

    My problem is that I have a sorted listview with multiple columns.  Because of having the list sorted, I can never be sure of the specific index that an item may get added at.  Specifically, when trying to add the subitems, after adding the main item, I can't just rely on the index of the main item.  Normally the sub items would be added using a line like this.

    lstview.listitems(i).subitems(1) = sSubItemText

    But when I added the main item, that index could be anywhere in the list since it's a sorted list.  So I figured I'd need to use the key, but I can't figure out how to reference a specific list item by the key.

    Thank you!

     

    • Post Points: 5
  • 07-04-2007 7:34 AM In reply to

    Re: [74] ListView Control

    I would like to know whether there is any way to change change font/back ground color for individual subitems in a listview control.

    Regards
    Jyotiraditya

    • Post Points: 5
Page 3 of 4 (50 items) < Previous 1 2 3 4 Next >