Jump to content

Problem with showing xml data on grid view !!!


nobitavn94
 Share

Recommended Posts

I have a xml file that has structure as follow :<?xml version="1.0" encoding="utf-8" ?><Questions><Level id="1"> <Question> <Id>1</Id> <Q> content of a question...</Q> <O1>..option 1 </O1> <O1>..option 2 </O1> <O1>..option 3 </O1> <O1>..option 4 </O1> <A> correct answer </A> </Question><Question> <Id>2 </Id> <Q> content of a question...</Q> <O1>..option 1 </O1> <O1>..option 2 </O1> <O1>..option 3 </O1> <O1>..option 4 </O1> <A> correct answer </A></Question> .... .... ....</Level><Level id="2"> ... ...</Level>.....<Level id="n">..</Level></Questions>I want to show questions on grid view like this :Level Id Content of question Option 1 Option 2 Option 3 Option 4 Correct answer.by using dataset.I just can show question on grid view like this :Id Content of question Option 1 Option 2 Option 3 Option 4 Correct answerSome code :Dataset ds =new Dataset();ds.ReadXml(...Questions.xml..);gridview.DataSource =ds.Tables[1].gridview.DataBound();How can I add the column Level ( of a question ) ?Thanks in advance !

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...