Setting ValueType for a DataGridView column

What are the acceptable arguments to use There is no documentation on that and a Web search wasted a lot of time.

Thanks,

Dave




Answer this question

Setting ValueType for a DataGridView column

  • Fred Morrison

    This example may help you out...

    column = New DataGridViewTextBoxColumn()

    column.Name = "Col 2 Hdr"

    column.ValueType = GetType(System.DateTime)

    dgv1.Columns.Add(column)


  • benjycleyndert

    Thanks, I stumbled across that shortly before I got your response. In the help on DataTables, it showed an example of setting the DataType and I tried it.

    Anyway, thanks for the response. I suspect that I will be making a nuisance of myself for a while. I am moving from VB6 to .Net and am the guinea pig for my location.



  • Setting ValueType for a DataGridView column