views:

365

answers:

1

Hi,

I have a Listview that uses databind. I set the DataSource property to a binding source. All works fine. The problem is that I need to have a column that is not databinded and contains only buttons that have the same handler for click event. To accomplish this I tried to add a subitem that is a button for each ListViewItem after InitializeComponent but doesn't work, nothing is displayed. Also I set the list view column type to Control. If I add elements to ListView and isn't databinded that the buttons appear.

So it will be a great help for me to know if buttons could be displayed in column that is not databinded when the listview uses databinding for rest of columns.

Thanks!

A: 

The best thing to do here (assuming you mean ListBox), is to have a single button above or below the listbox, that uses the ListBox.SelectedItem property to investigate the selected item and do something with it.

Neil Barnwell
I want to do someting like this http://companionkit.visualwebgui.com/main.wgx
Manu
I appreciate that, but it's not typical design. On a website you might expect to see a *hyperlink* in a column, but on a Windows UI users expect either to double-click an item in a listbox or select an item then press a button (or both). It makes for a much less cluttered interface.
Neil Barnwell