gadNY Posted May 7, 2009 at 03:01 PM Report #262138 Posted May 7, 2009 at 03:01 PM boas Tenho uma listbox a carregar o nome dos registos de uma BD, e tenho várias texts, eu queria que ao carregar no nome do registo na list preenche-se as texts com os respectivos campos. eu ja tentei no evento click, mas ao carregar mesmo que seja numa area em branco ele vai buscar os dados do primeiro registo :X ou seja, tenho que descobrir na list de que registo se trata, e enviar os outros campos para as texts, alguem tem uma ideia de como posso contornar isto ? :x
M6 Posted May 7, 2009 at 03:13 PM Report #262144 Posted May 7, 2009 at 03:13 PM Isso não tem um evento "onchange"? 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
gadNY Posted May 7, 2009 at 03:16 PM Author Report #262145 Posted May 7, 2009 at 03:16 PM nao :/ a list tem que detectar qual e o item seleccionado, e ao detectar vai a bd,busca o resto dos campos e preenche nas texts :x
M6 Posted May 7, 2009 at 03:27 PM Report #262149 Posted May 7, 2009 at 03:27 PM Exacto. Em todas as linguagens que conheço há um evento onchange (ou semelhante) nesse objecto que permite fazer isso. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
inginheiiro Posted May 7, 2009 at 03:34 PM Report #262151 Posted May 7, 2009 at 03:34 PM Evento. listview.selectedIndexChanged Elemento focado listview.focusedItem I used to have a life ... but i bought a programmable machine in 1982 ...
M6 Posted May 7, 2009 at 05:22 PM Report #262184 Posted May 7, 2009 at 05:22 PM Ora ai está. 👍 Nem me passava pela cabeça que o C# não tivesse esse evento. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now