Editable list view style control

  • Thread starter Thread starter wonil kim
  • Start date Start date
W

wonil kim

Hi, All.

Can I use ListView control for sub item editing purpose?
For example,

Name Value
------------------
X 1
Y 2
ATTR 10

If I have above style list name and value pair, is it possible allow to user
edit "Value" column only?

If I didn't get this feature from ListView control, what is your
recommendations?

Thanks.
 
Hello

As far as I know, the ListView Control doesn't support that.
You can use DataGrid class, and you can change its style so that it looks
like a ListView
or

You can handle the click event for the ListView Control, and create a
dynamic TextBox that have the same dimensions and position of the cell you
are editing.
and update the cell contents with code and destroying the TextBox when the
TextBox loses focus. This did the trick for me, I was using C++ and MFC. But
the same idea should work with C# and Windows Forms.

Best regards,
Sherif
 
Back
Top