I have used the Validate event in other controls which fires anytime somthing is done, don't know if this is any use.Originally posted by jkw119
doe anyone know how to trigger an event when a user enters data in a cell in a data grid. also, is it possible to disable columns (make readonly) and allow only certain columns to be edited.
thanks,
jeff
As far as disabling the columns, I don't know.
You can however hide them. The following code hides columns if it is of any use.
VB Code:
Private Sub HideColumns() ' Use the DataField property to determine which column is being ' tested. Show only three columns: ProductName, UnitPrice, and ' UnitsInStock. Dim c As Column For Each c In DataGrid1.Columns Select Case c.DataField Case "ProductName" c.Visible = True Case "UnitPrice" c.Visible = True Case "UnitsInStock" c.Visible = True c.Caption = "In Stock" ' Change the column header. Case Else ' Hide all other columns. c.Visible = False End Select Next c End Sub




Gary Lowe 

Reply With Quote