Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

find occurences in data table certain columns

$
0
0

Hello People,


I have made a simple SQL Query that put the results in a data-table where I already prepared certain columns I have created.

there are 20 different columns.

there is order number in the column ”order number” (column 2).

I need a function that contains a loop that will perform the following function:

If an item exists twice in the column, regardless of row, the first instance must control all identical instances throughout. When an identical instance is identified, the content from the “target language” column in the first instance must be copied to the “target language” columns in all the other instances.

here is what I got so far this is a part of old code

[code VB.net]
  If HashDatatable1.Rows.Count > 0 Then
            For i As Integer = 0 To HashDatatable1.Rows.Count - 1
                If Not HashDatatable1.Rows(i).Item(18).ToString.Contains("Language:") Then
                    HashDatatable1.Rows(i)(18) = "0"
                End If


                '  MsgBox(HashDatatable1.Rows(i).Item(18).ToString())


            Next
        End If


Could someone help me with a code?

Thank you in advance




Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>