PropertyGrid (binding)

C

csharpula csharp

Hello,
I have the folloing problem:

A PropertyGrid which suppose to be binded to listbox is not binded well.
I am doing such thing in the form constructor:

propGrid.SelectedObject=lbSelectedItems.SelectedValue;

and this is not really binded ,cause when I select different value in
listbox,there is no change on PropertyGrid. How can I solve this and
create a real binding? Thanks a lot!
 
M

Marc Gravell

PropertyGrid doesn't always play well with bindings... you can perhaps
listen to the ListBox.SelectedIndexChanged event, and set the grid's
SelectedObject to ListBox.SelectedItem?

There is unfortunately no ListBox.SelectedItemChanged, which rules out
direct binding...

Marc
 

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