Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Mimicking C# DataGrid formatting in HTML or XML

Mimicking C# DataGrid formatting in HTML or XML

Scheduled Pinned Locked Moved C#
xmlcsharphtmlquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joschmo80
    wrote on last edited by
    #1

    Experts, I wish to display a C# DataGrid exactly as it appears on a C# Form after saving the DataSet to a file. The format (xml or html) does not matter (I'm assuming these are my only choices). The best I can do so far is: 1. call the DataSet.WriteXMLSchema method to create an xsl file 2. call the DataSet.WriteXML method to create my XML file 3. Create an XslTransform object 4. Load the xsl file via XslTransform.Load 5. Transform my ZML file to HTML via the XslTransform.Transform(source, destination) method However, the HTML file does not contain any of the table formatting (since the generated xsl file doesnt contain table formatting). I realize I can create the XSL file by hand, but I was hoping there was a way to do it automatically such that table formatting is included. Any suggestions, either in creating an XML file with formatting or transforming a standard xml file to html such that formatting is preserved? Thanks in advance.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups