Need solution on one Problem where I am fetching values from datatable

image

As per screen above I am taking first empty row from Psoft Letter column on the basis of that I am fetching parallel value
in Ticket Number column as highlighted so I am successfull able to get it with the below query but this returning on one item I need all the below
items in ticket number column

dttable.AsEnumerable.SkipWhile(Function(x)Not String.IsNullOrWhiteSpace(x(“Psoft Letter”).ToString)).First.item(“Ticket Number”).ToString

If any solution then post here
Any help would be appreaciated here
Thanks in Advance !!

Hi @mittal.abhishek ,

I believe you would require to remove the last part of the Expression and Introduce the Select Method :

ticketNumbers = dttable.AsEnumerable.SkipWhile(Function(x)Not String.IsNullOrWhiteSpace(x("Psoft Letter").ToString)).Select(Function(x)x("Ticket Number").ToString).ToArray

Here, ticketNumbers is a variable of type Array of String

2 Likes

Another way to do it using for each loop on the datatable & using if condition to check for blanks. & add all the ticket nos in another datatable in this case i have created Dt_BlankTicketNo

Hope this helps :slight_smile:

@supermanPunch : Thanks for solution it’s working as expected !!

1 Like

Thanks for solution !!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.