Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
2 questions about datagrid
1. I have a form with a datagrid. I also created a menu that's whose visible property is set to false. When a row is right-clicked using the mouse, the menu is popped-up and the user is asked if he wants to delete the row. The problem is, how do I delete this particular row via code? By the way, the grid is populated by an adodb recordset and is locked.
2. One way to avoid the above scenario is to not lock the datagrid and have the AllowDelete property checked. The user can then delete any row he wants just by pressing the delete button. But at the same time, I don't want the user to be able to edit the contents of the datagrid. So if I go with this alternative, how then do I prevent a user from modifying the cells in the datagrid? Is there a way to disable only some columns in a datagrid? Can you give me some sample code?
Thanks.
Ramon
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement