Question WebBrowser Component and Table?!

alex198555

Member
Joined
Dec 13, 2010
Messages
11
Programming Experience
Beginner
Let's say, I have something like a table in the WebBrowser component, it's not actually a table, because the data organized in flash, but, it's organized like a table, it has like rows and columns. You can see more in the attached file.

Can I transform this text organized as table into DataGridView or some another tool that serves as table.

like_a_table.JPG
 
You can either point the WebBrowser to an existing URL (that contains your flash object) or build it within your app using HtmlDocument and WebBrowser.Document

This code I use to insert a Flash chart, but you can use the InnerHtml element to insert any other object (like a table)

VB.NET:
 Private Sub YourSubName(ByVal sender As Object, ByVal e As WebBrowserNavigatedEventArgs)


Dim vDocument As HtmlDocument
            vDocument = ChartBrowser.Document
            Dim vDiv As HtmlElement = vDocument.CreateElement("div")
            vDiv.InnerHtml = FusionCharts.RenderChartHTML("http://www.YourSite.com/flash/FCF_Column3D.swf", "", strXML, "Chart1", "500", "180", True)
            vDocument.Body.AppendChild(vDiv)


VB.NET:
 Public Function ChartDisplay(ByVal Doc As String, Optional ByVal IntRef As Integer = 0) As WebBrowser
        ChartBrowser = New WebBrowser
        If ChartBrowser.Document Is Nothing Then
            ChartBrowser.Navigate("about:blank")
        End If

        Select Case Doc
            Case "Test"
                AddHandler ChartBrowser.Navigated, AddressOf YourSubName

..............................
 
The main issue is that the original tables refreshes every 5 minutes! If I use your method, will it appear in the DataGridView as refreshed table or not?
 
The WebBrowser control emulates IE - so if it works in IE it should work in the control! If the page is being posted back to the server at 5 mins intervals you will see the same effect in any browser
 
Back
Top