winform表单中datagrid单元格点击后怎样设计成对话框模式
winform表单中datagridt每个单元格点击后显示对话框模式,对话框里包括了单元格所有内容,包括一行显示不下的,还可以修改,再点击ok存盘,或cancel取消操作,相当于点击后出显示一个小窗体一样,该窗体包括有文本框及OK和cancel两个按钮。http://10.75.55.111/Doc6.htm --------------------编程问答-------------------- Private Sub DataGridView1_CellDoubleClick(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick
Try
If DataGridView1.Item(e.ColumnIndex, e.RowIndex).Value Is Nothing Then Exit Sub
Dim frm As New Dialog1
frm.textbox1.Text = DataGridView1.Item(e.ColumnIndex, e.RowIndex).Value.ToString()
If frm.ShowDialog = Windows.Forms.DialogResult.OK Then
DataGridView1.Item(e.ColumnIndex, e.RowIndex).Value = frm.TextBox1.Text
End If
DataGridView1.Refresh()
Catch ex As Exception
End Try
End Sub --------------------编程问答-------------------- 不明LZ在说什么
补充:.NET技术 , VB.NET