Solved

Help with loading data in Grid

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

706 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

16 Experts available now in Live!

Get 1:1 Help Now