.NET Logo
Welcome Guest Search | Active Topics | Members | Log In | Register

listBox กับฐานข้อมูล Options · View
i_amm_cs18
Posted: Tuesday, March 11, 2008 11:14:54 AM
Rank: มือฝึกหัด
Groups: Member

Joined: 3/4/2008
Posts: 9
Location: thai

คือจะเอาข้อมูลที่query ให้ไปแสดงในlistBox  ค่ะ

แล้วพอคลิ๊กข้อมูลนั้นแล้ว  เอาตัวที่เลือกไปquery  แล้วแสดงค่าใน listBox อันที่2ช่วยตอบที่นะค่ะ

mrxc
Posted: Tuesday, March 11, 2008 12:52:01 PM
Rank: มือเทพ
Groups: Member

Joined: 3/6/2008
Posts: 196
Location: TH

แบ่งเป็น 2 ส่วนนะครับ

ส่วนแรกคุณจะต้องเพิ่มข้อมูลเข้าไปใน ListBox นั้นโดยการ Add Items ประมา่ณนี้ listbox.Items.Add(.....ข้อมูลที่จะเพิ่ม........)

 

ส่วนที่ 2 คุณจะต้องจับ Event การคลิกขน ListBox และตรวจสอบว่า Rows ไหนโดนคลิกครับแล้วก็ไป Query ต่อ

 

การจับ Event ใช้ listbox.ชื่อeventที่ต้องการ += กดTab เลยมันจัดการต่อให้เอง

Event ที่จะต้องจับก็ประมาณ Click นั้นล่ะครับ แต่จะชื่ออะไรผมก็จำไม่ได้หรอกครับ

ลองหาดูครับ

i_amm_cs18
Posted: Tuesday, March 11, 2008 7:20:22 PM
Rank: มือฝึกหัด
Groups: Member

Joined: 3/4/2008
Posts: 9
Location: thai

ขอบคุณค่ะจะลองทำดูนะค่ะ

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.


Sponsored by