Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

textbox databinding to new datarow

$
0
0

Hi:

Having searched for while, but can't find any solution.

Say I have a form with several textbox on it. when form is onshown, I bind those textbox to a datatable: txtCustCode.DataBindings.Add("Text", tblCustomer, "CustCode"); it seems OK for edit those textbox and update to tblCustomer.

What I like to know if I click Add button to add new datarow, and I hope the all textbox values will be empty and once save button clicked, all those data in textbox should be inserted into datatable.

How can I do like that? Do I have to set all textbox's databinding to null and then assign those textbox value to new datarow?

Thanks.

Roland


Viewing all articles
Browse latest Browse all 12583

Trending Articles