joeybagadonutz Posted November 29, 2003 Posted November 29, 2003 Hi, I am wondering if there is a way to make it so a user can right click on a datagrid row and hit "copy" so they can copy that row then paste the entire row when into a new record. Sort of like you can do in sql server enterprise manager or in a MS Access database. Is this possible? Is there a special way to enable right click mouse features? I am making a data entry interface for our agents and they really like the copy paste feature. Please let me know if there is a way to do this, thanks. -JBD Quote
joeybagadonutz Posted November 29, 2003 Author Posted November 29, 2003 Right now in the datagrid by default, you can select the whole row when you click to the left of the row, and the entire row becomes highlighted. So there must be a way to allow people to copy that row right? Anyone know? Thanks. Quote
Moderators Robby Posted November 29, 2003 Moderators Posted November 29, 2003 You can try something like this to copy into an array... Dim SomeArr As Array dataset1.Tables(0).Rows.CopyTo(SomeArr, Datagrid1.CurrentCell.RowNumber) Quote Visit...Bassic Software
Moderators Robby Posted November 29, 2003 Moderators Posted November 29, 2003 I didn't try either one, but you can test this one out.. 'ds being your dataset ds.Tables(0).ImportRow(ds.Tables(0).Rows(Datagrid1.CurrentCell.RowNumber)) Quote Visit...Bassic Software
joeybagadonutz Posted November 30, 2003 Author Posted November 30, 2003 okay thanks. So if that gives me the row, how do I paste it into a new row? Is there a way to make the right click of the mouse have the copy option or should I just program like a button or something to do this? thanks. Quote
Moderators Robby Posted November 30, 2003 Moderators Posted November 30, 2003 Yeah, use the ContextMenu. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.