Link to home
Start Free TrialLog in
Avatar of TheSonics
TheSonics

asked on

datatable add row

I want to add a row in the middle of my datatable, any hint ?
Avatar of riyazthad
riyazthad

   Dim table As DataTable = dataSet.Tables("TableName")
    Dim dr As DataRow = table.NewRow()

    dr("Field1") = "value1"
    dr("Field2") = "value2"
    table.Rows.Add(dr)

Thad
ASKER CERTIFIED SOLUTION
Avatar of ZeonFlash
ZeonFlash

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes you are right. I didnt look into his actual requirement. I thought he is asking just to add row.