开发者

Datagridviewtextboxcolumn length and text?

Using VB.NET

Am Using a textbox in Datagridview

Code for adding a textbox in DataGridview

Dim ti As New DataGridViewTextBoxColumn
DataGridView1.Co开发者_Python百科lumns.Add(ti)

Text box Maximum size should be 5. Text box should display " : "

How to set like this.

Need vb.net code Help


I'm not sure what you mean by 'Text box should display ":"' ? Are you wanting to provide a mask or something? Anyway, here's how to the maximum size bit:

    Dim ti = New DataGridViewTextBoxColumn
    ti.DataPropertyName = "TODO"
    ti.Name = "TODO"
    ti.HeaderText = "TODO"
    ti.MaxInputLength = 5
    DataGridViewTextBoxColumnDataGridView1.Columns.Add(ti)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜