Windows Forms DataGridView

  • Thread starter Thread starter Kali
  • Start date Start date
K

Kali

Could someone please tell me how I'd create the same datagrid functionality
(bind,add/edit/delete) from an asp.net page into a Windows form using the
DataGridView control? I am able to bind the control in the windows form but
not able to get add/edit/delete functionality working? Also need drop
downs, etc. in the grid. Event handlers? Buttons for each task? I'd
certainly appreciate any feedback?
 
Thanks a lot. I have no problem binding a datagridview to a table, however,
I cannot seem to embed the populated combobox and have it display the
corresponding record. Eg.

tblOrders
custid, book_id, quantity
2, 5, 1
2, 16, 3
3, 4, 1

tblCustomers
custid, name
2, John Doe
3, Jane Doe

tblBooks
book_id, title
5, "book 1"
16, "book 2"
4, "book 35"

I need the datagridview to display 2 rows (select * from tblorders where
custid=2) of 3 columns:

customer name: label, cant be changed
books: combobbox of books (all books titles in books table) with
corresrpoding book preselected. This can be changed (different selection)
Quantity: combobox of 1-100 with corresponding value selected.

I can do this in asp.net no problem but am having a hell of a time in a
windows form/datagridview.

Could you maybe point me to a sample? I'd certainly appreciate the
feedback. Thank you.
 
Back
Top