General discussion

Locked

Adding and Changing Record in DataGrid

By sylviaseow ·
I desperately need help from all of you. My problem is DataGrid related.

The situation is as follow: I have three command button in the form that is the Add, Change and Cancel...

1. How can I restrict the user to only add new record, when theyclick the Add button. (I was using AddNew Method). How to make the existing record to be read only and while the new record can be added...

2. I truly understand that when the user enter the data into the datagrid, all the data will be directly updated to the database. How would I reverse or clear off the new record added when the user click the Cancel button. Is there any function to undo the updated data to clear the newly added/ edited records into the database

These two problems really drive me mad. I wish that I could get help from the expert (I mean all of you). Your help and kindness will be mostly appreciated...

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Comments

Collapse -

Adding and Changing Record in DataGrid

by AON In reply to Adding and Changing Recor ...

To answer this question more infromation is required - for a start, what language / development environment are you using?

- A.

Collapse -

Adding and Changing Record in DataGrid

by sylviaseow In reply to Adding and Changing Recor ...

The question was auto-closed by TechRepublic

Collapse -

Adding and Changing Record in DataGrid

by Lord Ago 1 In reply to Adding and Changing Recor ...

Assuming you're using Visual Basic, you would do this by setting the properties of the DataGrid. Uncheck things like AllowAddNew, AllowUpdate, and AllowDelete.
A good way to use the cancel is to use "MoveLast","Delete","Refresh". This will erase the last entered record.Have Fun!!

Collapse -

Adding and Changing Record in DataGrid

by sylviaseow In reply to Adding and Changing Recor ...

The question was auto-closed by TechRepublic

Collapse -

Adding and Changing Record in DataGrid

by sylviaseow In reply to Adding and Changing Recor ...

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums