Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Re: 2 question about datagrid


Message #1 by "Pheap" <012803869@m...> on Tue, 27 Feb 2001 22:40:42 +0700
in popup menu u can write code that the same as in delete buttom. then u 
have to refresh the data control so that the datagrid can be changed.

Pheap

>1. I have a form with a datagrid.  I alsa 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?
>
>Thanks.
>
>Ramon




  Return to Index