xml to datagrid
-
Anyone knows how to convert the following xml contents into a datagrid using asp.net? In the datagrid, there shall be 4 columns: listenPort,schemeAndHostPort,maxConnections,readTimeoutSeconds. - This is a sample mnitor config file - 3600 1 - - This redirects to a local machine 9090 http://localhost:80 1000 30 - This redirects to another machine 8080 http://172.17.168.112:80 1000 30 -- modified at 2:49 Wednesday 21st September, 2005
-
Anyone knows how to convert the following xml contents into a datagrid using asp.net? In the datagrid, there shall be 4 columns: listenPort,schemeAndHostPort,maxConnections,readTimeoutSeconds. - This is a sample mnitor config file - 3600 1 - - This redirects to a local machine 9090 http://localhost:80 1000 30 - This redirects to another machine 8080 http://172.17.168.112:80 1000 30 -- modified at 2:49 Wednesday 21st September, 2005
Hi there, + To display the xml data in a datagrid control, you first need to create a datasource that represents xml data, then bind it to the datagrid. The datasource can be a dataset or a custom array object, you can take a look at the link below to see how to infer a dataset from XML: http://msdn.microsoft.com/library/en-us/cpguide/html/cpconinferringcolumns.asp[^] If you want to create a custom array object, you can simply parse the xml document and initialize the custom object. + Another way to display xml data is to use the XML server control instead of the datagrid control, but you have to specify the xsl stylesheet for transforming. Just some ideas.