I'm using a flexgrid (which I've been told is similar to a datagrid). What you need to do is add code to the grids startedit method that checks to see if the column selected is the one that you want to display a checkbox in. If it is you take control away from the flexgrid.
Here's the code I have that checks to see if the column clicked is the that's displaying the date.
If VSFlexGrid1.ColDataType(Col) = flexDTDate Then
' we'll handle the editing ourselves
Cancel = True
' position date picker control over cell
DTPicker.Move VSFlexGrid1.CellLeft, VSFlexGrid1.CellTop, VSFlexGrid1.CellWidth, VSFlexGrid1.CellHeight
' initialize value, save original in tag in case user hits escape
If VSFlexGrid1.Cell(flexcpText, Row, Col) <> "" Then
DTPicker.Value = VSFlexGrid1.Cell(flexcpText, Row, Col)
Else
DTPicker.Value = WeekOf
End If
DTPicker.Tag = VSFlexGrid1
' show and activate date picker control
DTPicker.Visible = True
DTPicker.SetFocus
' make it drop down the calendar
SendKeys "{f4}"
|