Editable list view style control

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.
 
S

Sherif ElMetainy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top