如果我的问题对您来说可能显得很愚蠢,我会事先通知我,但我在垂直放置dataGridview中的列名时遇到问题。我正在使用流动代码填充DataGridView:
Dim StrQwery As String = "SELECT * FROM employees WHERE employee_id = (select MAX(employee_id) FROM employees AND registered = 'UNREGISTERED';
Dim smd As MySqlCommand
smd = New MySqlCommand(StrQwery, myconn)
smd.CommandType = CommandType.Text
Dim da As New MySqlDataAdapter(smd)
Dim cb As New MySqlCommandBuilder(da)
Dim ds As New DataSet()
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
If n = 1 Then
If Not Page.IsPostBack Then
GridView1.DataBind()
End If
Else
GridView1.DataBind()
End If
除了我需要将名称,位置,身份证号等帐户属性定位在水平但垂直方向以外,一切都运作正常。像这样:
| NAME |约翰|
| SURNAME |飞利浦|
| POSITION |管理器|
我找不到办法怎么做。请问有人能给我一些提示吗?
提前多多感谢。