Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 8 Jul 2008 13:47:03 -0700,    group: microsoft.public.dotnet.framework.compactframework        back       


Substitute for ComboBox FindString in compact framework?   
I have a combobox bound to a dataset containing States and their 
corresponding ID's.  How would I set the combobox selection to the textvalue 
retrieved from the database?  

In Windows forms I would do something like this, however my understanding is 
that FindString is not available in the compact framework:

cboState.SelectedIndex = cboState.FindString(value)

I have read that an alternative is to iterate through the items collection, 
however I can't seem to get this to work.  Any sample code to accomplish this 
would be much appreciated.
date: Tue, 8 Jul 2008 13:47:03 -0700   author:   tthompson2007

Re: Substitute for ComboBox FindString in compact framework?   
It is possible to recreate this method with a little bit of native interop 
since the underlying control supports the windows message to do the find. I 
posted the details here:-
http://inthehand.com/blogs/peterfoot/archive/2008/07/10/implement-findstring-for-a-combobox.aspx

Peter

-- 
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - Software Solutions for a Mobile World
In The Hand Ltd - .NET Components for Mobility

"tthompson2007"  wrote in message 
news:5051BBC3-23D7-4B96-8A86-E2F57A39BB6B@microsoft.com...
>I have a combobox bound to a dataset containing States and their
> corresponding ID's.  How would I set the combobox selection to the 
> textvalue
> retrieved from the database?
>
> In Windows forms I would do something like this, however my understanding 
> is
> that FindString is not available in the compact framework:
>
> cboState.SelectedIndex = cboState.FindString(value)
>
> I have read that an alternative is to iterate through the items 
> collection,
> however I can't seem to get this to work.  Any sample code to accomplish 
> this
> would be much appreciated.
date: Thu, 10 Jul 2008 16:41:00 +0100   author:   Peter Foot

Re: Substitute for ComboBox FindString in compact framework?   
Thanks for your help Peter.  By the way...I've gotten a lot of use out of 
your book.  Mobile Development Handbook.

"Peter Foot"  wrote in message 
news:63746CFC-9D74-40CB-8373-D7EAD7107F26@microsoft.com...
> It is possible to recreate this method with a little bit of native interop 
> since the underlying control supports the windows message to do the find. 
> I posted the details here:-
> http://inthehand.com/blogs/peterfoot/archive/2008/07/10/implement-findstring-for-a-combobox.aspx
>
> Peter
>
> -- 
> Peter Foot
> Microsoft Device Application Development MVP
> peterfoot.net | appamundi.com | inthehand.com
> APPA Mundi Ltd - Software Solutions for a Mobile World
> In The Hand Ltd - .NET Components for Mobility
>
> "tthompson2007"  wrote in message 
> news:5051BBC3-23D7-4B96-8A86-E2F57A39BB6B@microsoft.com...
>>I have a combobox bound to a dataset containing States and their
>> corresponding ID's.  How would I set the combobox selection to the 
>> textvalue
>> retrieved from the database?
>>
>> In Windows forms I would do something like this, however my understanding 
>> is
>> that FindString is not available in the compact framework:
>>
>> cboState.SelectedIndex = cboState.FindString(value)
>>
>> I have read that an alternative is to iterate through the items 
>> collection,
>> however I can't seem to get this to work.  Any sample code to accomplish 
>> this
>> would be much appreciated.
>
date: Fri, 18 Jul 2008 09:06:05 -0500   author:   Tobe Thompson

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us