Results 1 to 2 of 2

Thread: DataColumn and precision

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181

    DataColumn and precision

    Does anyone have any idea how to set the precision of a column? The DataColumn object gives most properties, but precision. However using the server explorer you can get the precision details of a column in a table, as a property, so its got to be foalting around somewhere.

    Cheers
    Wind and waves resolves all problems.

  2. #2
    Registered User jkw119's Avatar
    Join Date
    Oct 2001
    Location
    Pittsburgh
    Posts
    256
    VB Code:
    1. Dim myDataColumn As DataColumn
    2. Dim myDataRow As DataRow
    3. Dim SampleTable As DataTable
    4. Dim SampleDataSet as DataSet
    5.  
    6. myDataColumn = New DataColumn()
    7. myDataColumn.ColumnName = "SampleTable"
    8. SampleTable.Columns.Add(myDataColumn)
    9. myDataColumn.ReadOnly = True
    10. myDataColumn.DataType = System.Type.GetType("System.Double")
    11.  
    12. Me.DataGrid1.SetDataBinding(SampleDataSet, "SampleTable")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width