Quantcast
Channel: Data Grid Düzenleme
Viewing all articles
Browse latest Browse all 5

Data Grid Düzenleme

$
0
0

Dim da As New OleDbDataAdapter("select musteri_a, sum(kg) as giris, '' as cikis, '' as fark from urun_g group by musteri_a ", conn) Dim ds As New DataSet da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) For Each row As DataGridViewRow In DataGridView1.Rows Dim cmd As New OleDbCommand("select sum(kg) from urun_c where musteri_a=?", conn) With cmd.Parameters .Add("@?", OleDbType.WChar).Value = row.Cells(0).Value End With If DBNull.Value.Equals(cmd.ExecuteScalar) Then row.Cells(2).Value = 0 Else row.Cells(2).Value = cmd.ExecuteScalar End If cmd.Parameters.Clear() row.Cells(3).Value = row.Cells(1).Value - row.Cells(2).Value Next

geçen günlerde böle bi kod yazmıştnız

burada 4.cü kolonun değeri 0 ise o satırı nasıl silebilirz ordan .

if row.cells(3).value = 0 then

? :)

end if


CnR



Viewing all articles
Browse latest Browse all 5

Latest Images