CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 1999
    Posts
    28

    How to edit in ListView?

    I using listview, with two columns
    I want the user will be able to change the text
    in these two fields,but only the first field
    is editable, can i change the second field


  2. #2
    Join Date
    May 1999
    Posts
    2

    Re: How to edit in ListView?

    You can put the column that you can edit in font of the one you can't with the position command.


  3. #3
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: How to edit in ListView?

    Hi

    There is no easy way of doing this in VB5/6. If you know any C/C++ (or at least how to convert the code into VB), then the MFC CodeGuru site has some excellent examples of how to achieve this.

    http://www.codeguru.com/listview/index.shtml is the index page of ListView routines for MFC programmers.


    Regards

    Chris Eastwood

    CodeGuru - the website for developers
    http://www.codeguru.com/vb

  4. #4
    Join Date
    May 1999
    Posts
    9

    Re: How to edit in ListView?

    Well, there is always the possibility, to draw an edit box on top of the listview.
    I had almost the same problem with the MSGrid control where you also have no
    ability to edit.
    I there used the click event to determine the position within the grid, and draw
    a text box exactly above that position. I therefor created a subdialog with no
    frame and only the text box as control. I resize form and control to the same
    size and when the form loses the focus I use the value from the text box to
    update my grid control.
    This is kind of messy but it is a much faster work around than building my own
    editable grid control.
    Think about it,
    Uwe Reimann


  5. #5
    Join Date
    May 1999
    Posts
    28

    Re: How to edit in ListView?

    hi
    maybe Solution to this problem is use DBGrid in unbound mode that’s mean not connected to database
    It’s different from listView in the matter of the programmer is responsible of maintaining the list More detail you can get in The following file is available for download from the Microsoft Software
    Library:
    <AHREF="http://support.microsoft.com/downloa...s/Dbgridub.exe">Dbgridub.exe</A> <I>(size: 37916 bytes)</I>





  6. #6
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: How to edit in ListView?

    If you want more editing features, take a look at
    MS FlexGrid. It doesn't support direct editing. But it is quite easily done, with a little bit of coding.
    Ravi


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured