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)
精彩评论