Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

problem in binding same column name in a data table

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

    problem in binding same column 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' ".

     

    Location

    A

    B

    Total
    Location Wise

     

    Single Entry

    Double Entry

    Single Entry

    Double Entry

    Single Entry

    Double Entry

    CHENNAI

    0

    0

    0

    0

    0

    0

    MUMBAI

    0

    0

    0

    0

    0

    0

    KOLKATA

    0

    0

    0

    0

    0

    0

    NEW DELHI

    0

    0

    0

    0

    0

    0

    PUNE

    0

    0

    0

    0

    0

    0

    So can anyone help me to solve this problem.

     

     

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