0

Hi,

I am creating a online visitor tracking application in vb.net. This application tracks the visitor from my website and display records in my application.

All the records are carry with xml web services [nusoap]. This Xml is bind to my datagridview control. Every time [on timer tick event] web services generate xml and bind to datagridview. This way i need to clean my datadgidview rows and re-bind again. so that i have lost my selection and order.

Is there any way so that i can update my datagridview rows or can say cell value without clean rows.

Thanks

2
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by adam_k
0

Hi,

The Scenario is..

I called a web service which return me XML (return type string). Then i bind this XML to datagridview.

Ex. XML

<visitor>
<visitorIP>127.0.0.1</visitorIP>
<host>Some Host</host>
</visitor>

The code i am using..

Dim dataVL as String
dataVL = webservice.loadVisitors() ' web service call

Dim ds As New DataSet
Dim stringReader As New StringReader(dataVL)
ds.ReadXml(stringReader)

datagridview.SetDataBinding(ds.Tables(0), "")

This way the rows is datagridview bind again and again.. and alwaya i lost my selection and order..

I want to update only specific call values / rows from XML.
I don't want to reload all rows.

The web service calls on timer tick event (3 seconds) place inside backgroundworker.

Edited by kallas: n/a

0

i try to as u told above. But during merge new rows has added instead of updating old rows.

0

And I'm guessing that we don't want that?
So you want to update host name and keep the IP same in your example xml?

0

I don't have a clue how to do it with datasets.
If I had to do it (without using SQL)I'd go with datatable and find using the IP address. If I got a result, I'd update the host name if not I'd add a row.

If you put SQL in the picture it's a walk to the park.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.