我正在尝试在Gridview中显示短信。消息显示正确,但不是一行显示,而是以不同的行显示
预期输出:
我的短信
当前输出:
我
文字
消息
代码段:
Dim msgRow As New LayoutGrid.Row
msgRow = New LayoutGrid.Row(1)
msgRow.Cells(0).Text = LINE_BREAK_TOKEN
gridOut.Rows.Add(msgRow)
msgRow = New LayoutGrid.Row(1)
msgRow.Cells(0).Text = "My Text Message"
gridOut.Rows.Add(msgRow)
答案 0 :(得分:0)
您可以尝试使用Cell的ColumnSpan属性,执行类似 -
的操作Dim msgRow As New LayoutGrid.Row
msgRow = New LayoutGrid.Row(1)
msgRow.Cells(0).Text = LINE_BREAK_TOKEN
gridOut.Rows.Add(msgRow)
msgRow = New LayoutGrid.Row(1)
msgRow.Cells(0).ColumnSpan = 6
msgRow.Cells(0).Text = "My Text Message"
gridOut.Rows.Add(msgRow)
假设表/网格中有6列