Is there any way to change the selected row in a DataGridView programmatically?


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
Could you add a context menu to the grid?  I have done this with the DevExpress XtraGrid...works quite well.

Bill

Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Marcia G Akins (09/05/2008)
And after your last reply, I looked at the ListView in Strataframe.

I suggested you to look at the StrataFlix sample application which uses the new enhanced list.

It also had no RightCLick event that I could hook in to.

A single event, the MouseClick event is used to handle all this in .NET controls like this:

Private Sub lstServiceCalls_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstServiceCalls.MouseClick

     If e.Button = Windows.Forms.MouseButtons.Right Then

          '-- do your stuff here.    

     End If

End Sub

And if all you want is to show a shortcut menu (ContextMenuStrip in .NET) all you need to do is add a SF ThemedContextMenuStrip to your form, add all the items you want then add that menu to the form's property ContextMenuStrip and you are done, not need to manage it via the right click like in VFP. 

BTW, StrataFlix Main Form also have a sample of a ThemedContextMenuStrip.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search