Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8654613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:49:54+00:00 2026-06-12T14:49:54+00:00

this.dataGrid1 = new System.Windows.Forms.DataGrid(); this.dataGrid1.DataMember = textBox1.Text.ToString(); this.dataGrid1.Location = new System.Drawing.Point(36, 46); this.dataGrid1.Name =

  • 0
        this.dataGrid1 = new System.Windows.Forms.DataGrid();
        this.dataGrid1.DataMember = textBox1.Text.ToString();
        this.dataGrid1.Location = new System.Drawing.Point(36, 46);
        this.dataGrid1.Name = "dataGrid1";
        this.dataGrid1.Size = new System.Drawing.Size(364, 532);
        this.dataGrid1.TabIndex = 0;
        // 
        this.AutoScaleBaseSize = new System.Drawing.Size(50, 13);
        this.ClientSize = new System.Drawing.Size(592, 573);
        this.Controls.AddRange(new System.Windows.Forms.Control[] { this.dataGrid1 });
        ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
        this.ResumeLayout(false);


        XmlDataDocument xmlDatadoc = new XmlDataDocument();
        xmlDatadoc.DataSet.ReadXml("abcd.xml");

        DataSet ds = new DataSet("abc");
        ds = xmlDatadoc.DataSet;

        dataGrid1.DataSource = ds.DefaultViewManager; 

It is showing the hierarchial structure but it is not distinguishing between the child and parent node properly.i only want to see the root node which should be a link to its child node.also,i want the datagrid to be able to edit the xml file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:49:55+00:00Added an answer on June 12, 2026 at 2:49 pm

    After reading the Xml in DataSet why dont you set the DataTable rather than the whole DataSet as DataSource of the Grid ?

        XmlDataDocument xmlDatadoc = new XmlDataDocument();
        xmlDatadoc.DataSet.ReadXml("abcd.xml");
    
        DataSet ds = new DataSet("abc");
        ds = xmlDatadoc.DataSet;
    
        dataGrid1.DataSource = ds.Tables[0]; 
    

    Adjust the Table index with your appropriate Root table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use a System.Windows.Forms.DataGrid control in my Compact Framework 3.5 Window Mobile
I am new to Flash and AS3. I have a DataGrid like this Item
I am trying to subclass System.Windows.Controls.DataGrid in order to add special commands to which
I've got a strange problem here regarding sorting of a WPF DataGrid (System.Windows.Controls.DataGrid in
I am working on WPF and DataGrids, I am really new on this. And
So i got this DataGrid in which i manually defined all the columns: <DataGrid
I've got a DataGrid with 6 columns: ComboBox;ComboBox;CheckBox;CheckBox;CheckBox;TextBox I'm trying to populate this DataGrid
from this (normal dataGrid) (source: narod.ru ) into this (horisontal data grid) How to
This is my first time working with a WPF datagrid. From what I understand
This is similar to this question I asked last week. My dataGrid is populated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.