Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

How to change the datacolumn name in a data table

Last post 05-07-2008 10:40 AM by devichandran. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-07-2008 10:40 AM

    How to change the datacolumn name in a data table

    Hi,

    I have created a datacolumn as below.

    dim arr()={A,B}

    dtcol = New DataColumn(" ")

    dt1.Columns.Add(dtcol)

    For k = 0 To UBound(arr)

    dt1.Columns.Add(New DataColumn("Single Entry" ))

    dt1.Columns.Add(New DataColumn("Double Entry"))

    Next

    dtcol = New DataColumn("Single Entry")

    dt1.Columns.Add(dtcol)

    dtcol =
    New DataColumn("Double Entry")

    dt1.Columns.Add(dtcol)

     

    by using the above code i am trying to get the following output.but the problem is "when the loop executes it returns error code as 'The Single Entry datacolumn already exists' ".

    So can anyone help me to solve this problem.

     

     

    • Post Points: 5
Page 1 of 1 (1 items)