Datagrid Problem

lroyce
01-14-2004, 08:19 AM
I have a datagrid in an application that displays search results.
I do not allow users to do any adding, deleting, etc but they can select a row and display the associated record.
Something I did not realize (but a user found for me...), if a user clicks/double clicks on a cell, the value in that cell replaces the value for the cell in the first column of that row.
How can I stop this from happening?

Dennis DVR
01-14-2004, 08:24 AM
Private Sub DataGrid1_BeforeColEdit(ByVal ColIndex As Integer, ByVal KeyAscii As Integer, Cancel As Integer)
Cancel = True
End Sub

lroyce
01-14-2004, 09:20 AM
Works perfectly! Thanks Duane!!!



Private Sub DataGrid1_BeforeColEdit(ByVal ColIndex As Integer, ByVal KeyAscii As Integer, Cancel As Integer)
Cancel = True
End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum