No problem, Kaarthik... it was a good answer, nevertheless! :-)

On Jun 28, 4:53 pm, Kaarthik Padmanabhan <[email protected]> wrote:
> Ah, okay. I probably misunderstood the OP's query. Thanks Cerebrus, for
> clarifying and for the reply.
>
> On Sun, Jun 28, 2009 at 4:58 PM, Cerebrus <[email protected]> wrote:
>
> > It appears that the OP is only interested in retrieving the *Values*
> > of ListBox items rather than a Databinding example.
>
> > The Winforms ListBox does not expose any properties that would allow
> > you to access the Values of Selected Items, mainly because it simply
> > databinds to Objects and calls their ToString() method to display
> > text. Rather than trying to query the ListBox for selected values, you
> > should instead find out the selected items and then query the actual
> > IEnumerable datasource to find the property that matches the
> > ValueMember. IOW, find the Values in your datasource.
>
> --
> Kaarthik,http://coding-passion.blogspot.com

Reply via email to