Community discussion forum

XBrowse

This is a comment thread discussing XBrowse
  • 9 years ago

    This thread is for discussions of XBrowse.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 5 months ago

    I modified the code to accept an XML string instead of opening a file.

     

    Public Message As String

    Public Sub LoadXML()

    Dim d As New DataSet() 'Dim local dataset object for this method

    Try

    Dim XmlDataDocument As New XmlDataDocument

    XmlDataDocument.DataSet.ReadXml(New IO.StringReader(Message))

    d = XmlDataDocument.DataSet.Copy

    dg1.DataSource = d ' bind datagrid control to the local dataset object

    Catch exp As Exception ' catch any exceptions that may get thrown and display in messagebox

    MessageBox.Show(exp.Message.ToString, "Exception was caught", MessageBoxButtons.OK, MessageBoxIcon.Error)

    End Try

    ds = d.Copy 'copy local dataset object up to global dataset for persistance

    dg1.DataSource = ds 'reset datagrid datasource property to global dataset object

    dg1.Refresh() 'refresh datagrid

    dg1.Collapse(-1) 'collapse datagrid to get back to root node

    d.Dispose() ' dispose of local dataset object

    End Sub

Post a reply

Enter your message below

Sign in or Join us (it's free).