how to make a datagrid active...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello everybody

Is there a "onclick" event or another method that would allow me to open a popup window on a datagrid? I just want the popup window to be popped up when the user clicks on a row in the data grid, giving more detailed information from the row

Thanks
Mike
 
Hi Mike,
-----------------
Is there a "onclick" event or another method that would allow me to open a
popup window on a datagrid? I just want the popup window to be popped up
when the user clicks on a row in the data grid, giving more detailed
information from the row.
-------------------

I assume you are talking about a windowsform datagrid.

I got the idea to complete my datagridtextbox sample from your question, I
thought that this could be done,

\\\
Private WithEvents dtbCol1 As DataGridTextBox
Private WithEvents ToolTip1 As New ToolTip
')
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim ts As New DataGridTableStyle
ts.MappingName = ds.Tables(0).TableName
Dim column As New DataGridTextBoxColumn
ts.GridColumnStyles.Add(column)
DataGrid1.TableStyles.Add(ts)
column = CType(ts.GridColumnStyles(0), DataGridTextBoxColumn)
dtbCol1 = DirectCast(column.TextBox, DataGridTextBox)
column.MappingName = ds.Tables(0).Columns(0).ColumnName
column.HeaderText = "Cor"
column.Width = 30
End Sub
Private Sub dtbCol1_ToolTip(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles dtbCol1.MouseEnter
ToolTip1.SetToolTip(DirectCast(sender, DataGridTextBox), _
"Row: " & DataGrid1.CurrentRowIndex + 1)
End Sub
///
 
Back
Top