Results 1 to 4 of 4

Thread: C# (windows app.)

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    1

    Lightbulb C# (windows app.)

    how to bind XML data in property grid

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: C# (windows app.)

    The property grid displays the property values of an object. There is no 1:1 correspondence between XML data and a PropertyGrid. You'd have to read the XML data and assign the values to the properties of an object that you could then bind to the grid.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: C# (windows app.)

    You could, for example, read the XML data into a datatable and bind that to your grid.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: C# (windows app.)

    Quote Originally Posted by MaximilianMayrhofer
    You could, for example, read the XML data into a datatable and bind that to your grid.
    That wouldn't work. With a DataGridView or the like, yes, but a PropertyGrid would display the properties of the DataTable object like TableName, etc. It would not display the data in the table.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width