ให้ new project c# window application ขึ้นมาก่อนเลยครับ แล้วลาก DataGridView และ Button มาวางจัดให้ได้

button1 >> button_LoadData
datagridview1 อันนี้ผมไม่แก้ละกันนะครับ
โดยในตัว DataGridView เองเราไม่จำเป็นที่จะต้องเขียน Code แม้แต่น้อยเราก็สามารถติดต่อกับดาต้าเบสได้แล้ว ใช้เวลาเพียงนิดเดียวไม่น่าจะถึงนาทีด้วยซ้ำ
สำหรับการติดต่อดาต้าเบสก็ทำตามขั้นตอนเลยนะครับ
ให้ไปที่ window property ให้หา คำว่า DataSource แล้วเราจะทำการเลือก DataSource กัน ให้คลิกที่ ด้านขวาของคำว่า DataSource นะครับ จาำกนั้นคลิก Add Project Data Source

No comments:
Post a Comment