Solved

Help with loading data in Grid

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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 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