Solved

Help with loading data in Grid

Posted on 2012-04-04
5
374 Views
Last Modified: 2012-04-30
Hello, I created  the xml file below to try to load a grid with data in three rows in the following format


<Root>
  <xx>
    <xxID>1</xxID>
    <xx></xx>
  </xx>
<xx>
    <xxID>2</xxID>
    <xx></xx>
  </xx>
<xx>
    <xxID>3</xxID>
    <xx></xx>
  </xx>
</Root>

Desired Format in Grid:

xxID     xx
1
2
3

The goal is have users enter data in the xx column and save them to another xml file in the following format:

xxID     xx
1         1-Data1
2         2-data2
3         3-Data3

Save in following format:

1-Data; 2-Data2; 3-Data3

My problem is the Grid shows the data in a totally differnt format and I am unable to edit data in the xx column.

How do I fix this problem?

Below is the code use to load the xx.xml file

Dim xx As New DataSet
            xx.ReadXml(Server.MapPath("~/App_Data/xx.xml"))
            C1GridView1.DataSource = xx.Tables(0)
            C1GridView1.DataMember = "xx"
            C1GridView1.DataBind()

I am using a grid from ComponentOne but I thing this should also apply toa regular Gridview.

Victor
0
Comment
Question by:vcharles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37805033
Have you set the grid to be edit able? And how is grid showing data? Screenshot.
0
 

Author Comment

by:vcharles
ID: 37805253
Hi,

I was able to edit data after I set the Grid to editable, but I don't know I am getting columns which don't match my xml file (xx-id, xx_id_0), I only want towo columns but I am getting three and it seemslike every two rows has an ID value. Also everytime I clicked on the cell to add data I received the error on slide 2 and I clicked on continue I was able to add the data.
screenshot.pptx
0
 

Author Comment

by:vcharles
ID: 37806329
Help!
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37807703
Trouble is you are using a 3rd party control so its very difficult to understand the problem.
0
 

Author Comment

by:vcharles
ID: 37807723
OK, I will check with componentone. If no solution, I may need to use the regular Grid.

Thanks,

Victor
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question