Yellow to al

Iâ??m trying to do edit a row of a datatable

Dim dataTable As New DataTable("Vencimento"

I create four columns

Dim colWork As New DataColumn("ABONO", GetType(String)
colWork.Caption = "Abono
dataTable.Columns.Add(colWork

colWork = New DataColumn("VALORAB", GetType(String)
colWork.Caption = "Valor
dataTable.Columns.Add(colWork

colWork = New DataColumn("DESCONTO", GetType(String)
colWork.Caption = "Desconto
dataTable.Columns.Add(colWork

colWork = New DataColumn("VALORDES", GetType(String)
colWork.Caption = "Valor
dataTable.Columns.Add(colWork

Them I populate the first tow columns with a For, like this

For I as string = 1 To
row = dataTable.NewRow(
row("ABONO") = "Ret. Efectiva
row("VALORAB") = "10,00
dataTable.Rows.Add(row
Nex

This code create three equal lines, and the columns â??DESCONTOâ?? and â??VALORDESâ?? have the null expressio

What I want to do now is, fill the columns â??DESCONTOâ?? and â??VALORDESâ?
With â??IRSâ?? and â??5,00â?? strings

The out put must be like thi

Abono Valor Desconto Valo
Ret. Efectiva 10,00 IRS 5,0
Ret. Efectiva 10,00 IRS 5,0
Ret. Efectiva 10,00 IRS 5,0

Thereâ??s any one how can help me

Thank

Ana Rita

Re: Editing Rows by Miha

Miha
Wed Jan 21 08:02:59 CST 2004

Hi Ana,
"Ana Rita" <anonymous@discussions.microsoft.com> wrote in message
news:33AF31F8-B23E-4FEE-BF8A-0194C14F0EB5@microsoft.com...
> Yellow to all
>
> I'm trying to do edit a row of a datatable.
>
> Dim dataTable As New DataTable("Vencimento")
>
> I create four columns.
>
> Dim colWork As New DataColumn("ABONO", GetType(String))
> colWork.Caption = "Abono"
> dataTable.Columns.Add(colWork)
>
> colWork = New DataColumn("VALORAB", GetType(String))
> colWork.Caption = "Valor"
> dataTable.Columns.Add(colWork)
>
> colWork = New DataColumn("DESCONTO", GetType(String))
> colWork.Caption = "Desconto"
> dataTable.Columns.Add(colWork)
>
> colWork = New DataColumn("VALORDES", GetType(String))
> colWork.Caption = "Valor"
> dataTable.Columns.Add(colWork)
>
> Them I populate the first tow columns with a For, like this:
>
> For I as string = 1 To 3
> row = dataTable.NewRow()
> row("ABONO") = "Ret. Efectiva"
> row("VALORAB") = "10,00"
> dataTable.Rows.Add(row)
> Next
>
> This code create three equal lines, and the columns "DESCONTO" and
"VALORDES" have the null expression
>
> What I want to do now is, fill the columns "DESCONTO" and "VALORDES"
> With "IRS" and "5,00" strings.
>
> The out put must be like this
>
> Abono Valor Desconto Valor
> Ret. Efectiva 10,00 IRS 5,00
> Ret. Efectiva 10,00 IRS 5,00
> Ret. Efectiva 10,00 IRS 5,00
>
> There's any one how can help me?

Dim dr as DataRow
For Each dr in dataTable.Rows
dr("DESCONTO") = "IRS"
dr("VALORDES") = "5,00"
Next

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com