Considering this to be an anguished request, I have changed your subscription type to "No email". This means that you are still a member of the Group, but will not receive any emails reflecting activity within the Group. I have done this because you appear unsure about how to do it yourself.
-- Cerebrus. Group Moderator. On Oct 21, 11:24 am, "ankush mehta" <[EMAIL PROTECTED]> wrote: > DONT SEND ME MORE MAILSPLZ > > On 10/21/08, sallushan <[EMAIL PROTECTED]> wrote: > > > > > > > The link you have given works fine, but the following is better, > > > Private Sub DataGridView1_MouseDown(ByVal sender As Object, ByVal e As > > System.Windows.Forms.MouseEventArgs) Handles DataGridView1.MouseDown > > If e.Button = Windows.Forms.MouseButtons.Right Then > > Dim ht As DataGridView.HitTestInfo > > ht = Me.DataGridView1.HitTest(e.X, e.Y) > > If ht.Type = DataGridViewHitTestType.Cell Then > > Me.DataGridView1.CurrentCell = > > Me.DataGridView1(ht.ColumnIndex, ht.RowIndex) > > End If > > End If > > End Sub > > > Here we have used the "CurrentCell" property. > > > Now comming to your question regarding the ContextMenu. You can define > > ContextMenu for the whole DataGridView using its "ContextMenuStrip" > > property, but then you will get the Menu whenever you right click > > anywhere on DataGridView (on column header, row header, etc.). Since > > we need to show the menu when user right clicks on a Row, therefore we > > can define the ContextMenu for Row. Use the "ContextMenuStrip" member > > of "RowTemplate" property of DataGridView control. > > > Note that in DataGridView control we can define a different > > "ContextMenuStrip" for individual Columns/Rows/Cells. By defining the > > ContextMenuStrip in RowTemplate makes that ContextMenu available for > > all rows. > > > Reagards, > > Arsalan Tamiz > > > On Oct 20, 6:59 pm, Karthizen <[EMAIL PROTECTED]> wrote: > >> Hi, > > >> Hi, > > >> I have some 'n' number of records in a datagridview. I need to right > >> click on a row to pop up a context menu, then I need to click a > >> particular menu to display the contents of the row. Can you please > >> give me some suggestions on how to solve it? > > >> I found this > >> linkhttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=196286&SiteID=1 > >> which helps to right click & display the contents of a row. However I > >> need to first display the context menu and after that I need to > >> populate the row contents. > > >> Regards, > >> Karthizen- Hide quoted text - > > - Show quoted text -
