|
-
Oct 6th, 2011, 05:49 PM
#1
Thread Starter
Fanatic Member
Edit and Adding new seperatly in the dgv....
Hello: I'm working on a new form with a datagridview and need to know if this is possible:
The user can access the form in 2 different modes: Edit or Add.
If they enter in Add mode, I want the dgv to be clear of any data. The dgv
will have a set number of rows and they will enter data in text boxes and make selections from comboBoxes and save it to the db.
If they enter is Edit mode, I want the dgv to populate with data, based on the value they select from the previous form.
Can I do this? if so, could you please give me a push in the right dirrection?
Thanks,
Proctor
-
Oct 6th, 2011, 07:34 PM
#2
Re: Edit and Adding new seperatly in the dgv....
I think that you're trying to complicate something that's quite simple. All you need to do is bind a DataTable (or some other list) to the grid. That's it, that's all. If you want data then populate the table with data. If you don't want data then just add the desired number of rows with no data in them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|