PC Review


Reply
Thread Tools Rate Thread

Adding more display fields to a listbox's .displaymember property?

 
 
=?Utf-8?B?Tm9ibGUgQmVsbA==?=
Guest
Posts: n/a
 
      26th Jun 2006
Hello all,

I have a listbox on a screen that gets populated from a sqlce table using a
sqlcedataadaptor. My question is this:

How can I add more than one display field to the listbox's

.DisplayMember property?

I want to display two fields from the datatable in the list box (ie. #1 -
20ac.). The #1 comes from one field in the table and the 20ac. comes from
another field in the table.

Thanks in advance,


------------------------------------------
Noble D. Bell
AgForest Partners, Inc.

 
Reply With Quote
 
 
 
 
Ilya Tumanov [MS]
Guest
Posts: n/a
 
      26th Jun 2006
It's not easy with ListBox as it's not designed for that, but you can use
DataGrid or ListView instead



--
Best regards,


Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/...ramework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"Noble Bell" <(E-Mail Removed)> wrote in message
news:9C321963-357E-4A04-9980-(E-Mail Removed)...
> Hello all,
>
> I have a listbox on a screen that gets populated from a sqlce table using
> a
> sqlcedataadaptor. My question is this:
>
> How can I add more than one display field to the listbox's
>
> .DisplayMember property?
>
> I want to display two fields from the datatable in the list box (ie. #1 -
> 20ac.). The #1 comes from one field in the table and the 20ac. comes from
> another field in the table.
>
> Thanks in advance,
>
>
> ------------------------------------------
> Noble D. Bell
> AgForest Partners, Inc.
>



 
Reply With Quote
 
=?Utf-8?B?Tm9ibGUgQmVsbA==?=
Guest
Posts: n/a
 
      26th Jun 2006
Unless I missed something I cannot find the .DisplayMember property in the
ListView control.

I am having to use the .DisplayMember property along with the .ValueMember
property. I did not see this property in the ListView control either.

What I need to do is this, if there is another alternative:

1) Need to display two values in a listbox (ie. #1 - 20ac.)
2) When user clicks on that value in the list box I need it to use the table
id for the #1 value as an index id to some other child tables.

Any thoughts on this?

------------------------------------------
Noble D. Bell
AgForest Partners, Inc.



"Ilya Tumanov [MS]" wrote:

> It's not easy with ListBox as it's not designed for that, but you can use
> DataGrid or ListView instead
>
>
>
> --
> Best regards,
>
>
> Ilya
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> *** Want to find answers instantly? Here's how... ***
>
> 1. Go to
> http://groups-beta.google.com/group/...ramework?hl=en
> 2. Type your question in the text box near "Search this group" button.
> 3. Hit "Search this group" button.
> 4. Read answer(s).
>
> "Noble Bell" <(E-Mail Removed)> wrote in message
> news:9C321963-357E-4A04-9980-(E-Mail Removed)...
> > Hello all,
> >
> > I have a listbox on a screen that gets populated from a sqlce table using
> > a
> > sqlcedataadaptor. My question is this:
> >
> > How can I add more than one display field to the listbox's
> >
> > .DisplayMember property?
> >
> > I want to display two fields from the datatable in the list box (ie. #1 -
> > 20ac.). The #1 comes from one field in the table and the 20ac. comes from
> > another field in the table.
> >
> > Thanks in advance,
> >
> >
> > ------------------------------------------
> > Noble D. Bell
> > AgForest Partners, Inc.
> >

>
>
>

 
Reply With Quote
 
Ilya Tumanov [MS]
Guest
Posts: n/a
 
      27th Jun 2006
This should help you out:

http://forums.microsoft.com/MSDN/Sho...90411&SiteID=1

--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/...ramework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

"Noble Bell" <(E-Mail Removed)> wrote in message
news:B92E284C-1C92-4F75-9F97-(E-Mail Removed)...
> Unless I missed something I cannot find the .DisplayMember property in the
> ListView control.
>
> I am having to use the .DisplayMember property along with the .ValueMember
> property. I did not see this property in the ListView control either.
>
> What I need to do is this, if there is another alternative:
>
> 1) Need to display two values in a listbox (ie. #1 - 20ac.)
> 2) When user clicks on that value in the list box I need it to use the
> table
> id for the #1 value as an index id to some other child tables.
>
> Any thoughts on this?
>
> ------------------------------------------
> Noble D. Bell
> AgForest Partners, Inc.
>
>
>
> "Ilya Tumanov [MS]" wrote:
>
>> It's not easy with ListBox as it's not designed for that, but you can use
>> DataGrid or ListView instead
>>
>>
>>
>> --
>> Best regards,
>>
>>
>> Ilya
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> *** Want to find answers instantly? Here's how... ***
>>
>> 1. Go to
>> http://groups-beta.google.com/group/...ramework?hl=en
>> 2. Type your question in the text box near "Search this group" button.
>> 3. Hit "Search this group" button.
>> 4. Read answer(s).
>>
>> "Noble Bell" <(E-Mail Removed)> wrote in message
>> news:9C321963-357E-4A04-9980-(E-Mail Removed)...
>> > Hello all,
>> >
>> > I have a listbox on a screen that gets populated from a sqlce table
>> > using
>> > a
>> > sqlcedataadaptor. My question is this:
>> >
>> > How can I add more than one display field to the listbox's
>> >
>> > .DisplayMember property?
>> >
>> > I want to display two fields from the datatable in the list box (ie.
>> > #1 -
>> > 20ac.). The #1 comes from one field in the table and the 20ac. comes
>> > from
>> > another field in the table.
>> >
>> > Thanks in advance,
>> >
>> >
>> > ------------------------------------------
>> > Noble D. Bell
>> > AgForest Partners, Inc.
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listbox Displaymember property requires just one field? OldPro Microsoft VB .NET 1 27th Jul 2007 08:29 PM
Adding Fields property DecimalPlaces using the fields collection jeff Microsoft Access VBA Modules 9 16th Jan 2007 11:57 AM
Listbox / Combobox with multiple fields as displaymember =?Utf-8?B?U2VyZ2lvIFRvcnJlcw==?= Microsoft ADO .NET 5 24th Apr 2006 07:34 PM
DisplayMember property of ListBox control Sammy Microsoft C# .NET 0 13th Nov 2005 11:25 AM
ListBox DataSource DisplayMember Property Problems Irwin M. Fletcher Microsoft C# .NET 1 20th Aug 2003 11:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:48 AM.