TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vuk Stanojevic
1.6k
140
45.6k
C# load data to datagridview from xml
May 19 2020 12:30 PM
Hi Everyone,
i have a problem with importing data from xml to datagridview.
It load's only first part on xml, but not what i really need from xml.
Here is code:
private void btnSelect_Click_1(object sender, EventArgs e)
{
OpenFileDialog fd = new OpenFileDialog();
fd.Filter = "XML Files |*.xml";
fd.ShowDialog();
string path = fd.FileName;
DataSet ds = new DataSet();
ds.ReadXml(path);
dataGridView1.DataSource = ds.Tables[0];
}
and here is result:
Bellow you can see xtml which i want to load and i select in yellow what i want to show in datagridview,for each item in xml.
Values marked in yellow is what i want to show in datagridview, and first part which is surrounded with yellow is info which i get now in datagridview but which i don't want.
can you help me to solve this issue?
Thank you very much.
Reply
Answers (
10
)
How I Can Implement DirectIO Event Of POS Scanner Using C#
RDLC report filter by date to date showing no data