Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i use xml to create checkbox column to datagridv
Message
From
04/06/2011 12:09:11
 
 
To
01/06/2011 22:26:31
General information
Forum:
ASP.NET
Category:
XML
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01512499
Message ID:
01512851
Views:
53
You should be able to read that XML into a DataSet (using the DataSet.ReadXml() method) and use the DataSet as the DataSource for your DataGridView. In looking at your data though, I'm not sure which field you want to use for a checkbox?

~~Bonnie


>Hi all
> I use vb.net . I want to use xml to create checkbox column to datagridview, how can i do, thank you .
>The below is my xml code.
>
>
><?xml version="1.0" standalone="yes"?>
><DocumentElement>
>  <category>
>    <ID>1</ID>
>    <CategoryName>Beverages</CategoryName>
>    <ProductName>Outback Lager</ProductName>
>    <ProductSales>5468.4</ProductSales>
>    <ParentID>1</ParentID>
>  </category>
>  <category>
>    <ID>2</ID>
>    <CategoryName>Grains/Cereals</CategoryName>
>    <ProductName>Gnocchi di nonna Alice</ProductName>
>    <ProductSales>32604</ProductSales>
>    <ParentID>1</ParentID>
>  </category>
>  <category>
>    <ID>3</ID>
>    <CategoryName>Dairy Products</CategoryName>
>    <ProductName>Gudbrandsdalsost</ProductName>
>    <ProductSales>13062.6</ProductSales>
>    <ParentID>3</ParentID>
>  </category>
>  <category>
>    <ID>4</ID>
>    <CategoryName>Meat/Poultry</CategoryName>
>    <ProductName>Tourtire</ProductName>
>    <ProductSales>3184.29</ProductSales>
>    <ParentID>3</ParentID>
>  </category>
>  <category>
>    <ID>5</ID>
>    <CategoryName>Meat/Poultry</CategoryName>
>    <ProductName>Thringer Rostbratwurst</ProductName>
>    <ProductSales>34755.92</ProductSales>
>    <ParentID>4</ParentID>
>  </category>
>    <category>
>    <ID>6</ID>
>    <CategoryName>Meat</CategoryName>
>    <ProductName>Thringer Rostbratwurst</ProductName>
>    <ProductSales>4755.2</ProductSales>
>    <ParentID>3</ParentID>
>  </category>
>    <category>
>    <ID>7</ID>
>    <CategoryName>Poultry</CategoryName>
>    <ProductName>Thringer Rostbratwurst</ProductName>
>    <ProductSales>3755.9</ProductSales>
>    <ParentID>7</ParentID>
>  </category>
> 
></DocumentElement>
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform