skandi
March 16, 2018, 8:59am
1
Hi,
I what the syntax is for getting a specific item from a Data Table, DT.
Example: I want to get the item in the third row in column number 4.
I know how I can solve it by using Get row item and For each loop, but i want to use an assign function.
I have tried
DT.Rows(1).Table.Columns(3).ToString
…but it just works on the first row. When i change the row index it still outputs the same.
Any help would be appreciated
3 Likes
skandi
March 16, 2018, 9:21am
2
I think I found the solution by using:
DT.Rows(3).Item(4).ToString
arivu96
(Arivazhagan A)
March 16, 2018, 9:30am
3
HI @skandi ,
Dt.Rows(RowNumber)("ColumnName").ToString()
or
Dt.Rows(RowNumber)(ColumnIndes).ToString()
Example
Convert,ToString(Dt.Rows(0)("Name"))
or
Convert,ToString(Dt.Rows(0)(1))
Regards,
Arivu
5 Likes
MAHESH1
(MAHESHKUMAR JV)
March 16, 2018, 9:31am
4
@skandi
DT.Rows(3)(4).ToString
Regards,
Mahesh
5 Likes
skandi
March 16, 2018, 9:41am
5
Thanks for the help @MAHESH1 and @arivu96 !