Hello guys,
I have this code here that updates my gridviewdata with a json file every time i click a button.
this is the data i get in my gridviewdataCode:DataGridView2.Rows.Clear() Dim uri As Uri = New Uri("https://api.import.io/store/connector/06a2a24f-6678-407e-8ad0-c7cbe24cf33c/_query?input=webpage/url:http%3A%2F%2Ffxowebtools.saxobank.com%2Fretail.html&&_apikey=d4c36ddd8f8d4a629bdf06e47993809233ac34a0ee817f4af327f7e016e1cb0921ba78b0da4d9be881051cbf3cf672f1425214d8e687e33559e24fdd17bc5a606e8ce1eac3d6e064593e3fcc34d23344") Dim wc1 As System.Net.WebClient = New System.Net.WebClient() Dim VCItem As String = wc1.DownloadString(uri) Dim o As JObject = JObject.Parse(VCItem) Dim results As List(Of JToken) = o.Children().ToList Try For Each item As JProperty In results item.CreateReader() If item.Value.Type = JTokenType.Array Then For Each subitem As JObject In item.Values DataGridView2.Rows.Add(subitem("leftlabelcells_value"), (subitem("hideextra_number")), (subitem("rightpositioncells_number"))) Next End If Next Catch ex As Exception End Try
there is some unwanted data in my gridview in the second and third coulmn, i need them to be like this :
EURUSD 49 51
USDJPY 16 84
GBPUSD 65 35
AUDUSD 41 59
USDCAD 45 55
USDCHF 57 43
EURJPY 58 42
EURGBP 17 83
EURCHF 28 72
GOLD 33 67
SILVER 8 92
in other words, i need to take off all the brackets and all the digits after the first comma or the first decimal point.
any help would be greatly appreciated !




Reply With Quote
