Solved

Help with loading data in Grid

Posted on 2012-04-04
5
367 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

815 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now