Click to See Complete Forum and Search --> : How to edit in ListView?
ruvyb
May 18th, 1999, 11:49 AM
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
STEVROY
May 19th, 1999, 06:37 AM
You can put the column that you can edit in font of the one you can't with the position command.
Chris Eastwood
May 19th, 1999, 07:21 AM
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
Uwe Reimann
May 19th, 1999, 10:44 AM
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
ruvyb
May 20th, 1999, 03:43 AM
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/download/support/mslfiles/Dbgridub.exe">Dbgridub.exe</A> <I>(size: 37916 bytes)</I>
Ravi Kiran
May 20th, 1999, 03:51 AM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.