开发者

Datagridviewtextboxcolumn length and text?

开发者 https://www.devze.com 2022-12-11 17:17 出处:网络
Using VB.NET Am Using a textbox in Datagridview Code for adding a textbox in DataGridview Dim ti As New DataGridViewTextBoxColumn

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

精彩评论

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