Groups | Blog | Home
all groups > vb.net data > december 2004 >

vb.net data : ComboBox problem??? (newby in sight)


Najm
12/26/2004 10:51:48 PM
Hi, I have a table (in MSDE2000) called ENTITE ("entity" in english) :)
the table design is the following:

CODE_ENTITE Char(8),
NOM_ENTITE Char (50),
DIRECTION Char (50).

I have a combobox bounded to the table and that displays the 'CODE_ENTITE'.
I want to have a Label or text box at the right of the combo box that would
display the 'NOM_ENTITE' that refers to the 'CODE_ENTITE' clicked on in the
textbox.
Thanks in advance

Sunder NO[at]SPAM Online.microsoft.com
1/15/2005 12:31:34 AM
Hello
Windows forms helps you in doing all the databindings without writing a single line of code .
To do your Scenario
1)Drag a Sql Adapter and Configure it to use your table
2) Generate a Dataset and make sure you add an instance to form
3) Now Drag a combo box and label on to form
4) Set the Combo box Datasource to Dataset1.entity
Display Member to CODE_ENTITE
5) For the Label click on the Databindings and in the text property set it to some things like (DataSet11 - Entity.NOM_ENTITE)
6) Fill the adapter in the form load code and Run the app

When you change the combo box and Label automatically points to the right arrow . You can see the code generated in Form1.vb if you want to do it else where.

Thanks
Sunder
Vb.Net

--------------------
[quoted text, click to view]

Sorry I don't take feature request for WinRes: it belongs to the .NET Framework SDK. I'm a consumer of WinRes, just like you...
--------------------
[quoted text, click to view]

I'm afraid that LocStudio (when you say LS, I assume you are using LocStudio) does not have the option, and WinRes does not remember its size and location when it
was shut down.
If you are trying to call it in your own application, you can always use ProcessWindowStyle.Maximized when you start the process.

--------------------
[quoted text, click to view]


Najm
1/21/2005 12:47:49 AM
Thanx for ur answer, there is a problem and that Is when I change the
combobox, the lable remains unchaged.

Thanx again

[quoted text, click to view]
arrow . You can see the code generated in Form1.vb if you want to do it else
where.
[quoted text, click to view]
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15
..phx.gbl
[quoted text, click to view]
cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-
[quoted text, click to view]
LocStudio) does not have the option, and WinRes does not remember its size
and location when it
[quoted text, click to view]
#Rk@TOQ|^!ZG|&z6lA@-CY>/xB[Ei1mG*&S.+A5z;Ng?3OxX[#DVZw!"o!c`S|p:(zsX-EkdZZ(I
VnFRTX%!:Sv^L&Gk~s]vJ@Z~%Rm@G]fr*r2P}u5*&k/-_2
[quoted text, click to view]
+&Qowj6hiJ1b$^JQf:uy9456HIdKq*B`NC##kyO,>7"Ztnav+=71b*"E+DIme;{i&)ii{#6e?i8P
,1Xpc[q0}i:Tm];B1
[quoted text, click to view]
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-
[quoted text, click to view]

AddThis Social Bookmark Button