[]
        
(Showing Draft Content)

How to Filter DataGridView in a WinForms App

The DataGridView control provides only basic filtering functionality, which is where ComponentOne's DataFilter control truly shines. It enables users to filter data effortlessly based on various criteria or conditions, and it saves you time by automatically generating the filter panel UI.

In this tutorial, we'll explore how to enhance your DataGridView app by integrating the C1DataFilter to unlock advanced filtering capabilities to deliver a smoother and more intuitive user experience.

Filtering a DataGridView

Step 1: Set Up WinForms App with DataGridView and C1DataFilter

Begin by creating a new Windows Forms App project targeting the latest version of .NET and installing the C1DataFilter NuGet package to the project:

Once the package is installed, drag and drop a DataGridView control and a C1DataFilter control to the form. Dock the C1DataFilter control to the left of the form, and allow the DataGridView to fill the form.

Step 2: Set Up XML DataSource and Bind with DataGridView

In C# code, add a new class named DataService.cs and define GetData method that will return a DataTable containing sample data to manage the inventory of various products. Load the data from an XML file using the ReadXml method. A full sample XML file is provided at the bottom of this tutorial.

internal static class DataService
{
    internal static DataTable GetData()
    {
        var table = new DataTable();
        table.ReadXml("..\\Data\\inventory_data.xml");
        return table;
    }
}

Bind the DataTable to the DataGridView using its DataSource property as follows:

DataTable _dataSource = DataService.GetData();
dataGridView1.DataSource = _dataSource;

Step 3: Integrate the C1DataFilter Control with DataGridView

The DataGridView now displays the inventory management data. The C1DataFilter can be integrated with the DataGridView by binding it to the same DataTable.

Before assigning the DataSource, set the AutoGenerateFilters property of the C1DataFilter to true. This ensures that filters are automatically generated based on the data types of the fields in the DataSource.

c1DataFilter1.AutoGenerateFilters = true;
c1DataFilter1.DataSource = _dataSource;

The C1DataFilter automatically generates filters, but filters can also be customized by handling the FilterAutoGenerating event. Here, we'll customize a filter to show a search box using this event:

c1DataFilter1.FilterAutoGenerating += C1DataFilter1_FilterAutoGenerating;

private void C1DataFilter1_FilterAutoGenerating(object? sender, C1.DataFilter.FilterAutoGeneratingEventArgs e)
{
    if(e.Filter is ChecklistFilter checkListFilter)
    {
        checkListFilter.ShowSearchBox = true;
    }
}

In this tutorial, we explored the simple steps required to implement advanced filtering in a DataGridView using the C1DataFilter control. The C1DataFilter control is highly versatile and can be used with a variety of data-aware controls, including grids, lists, tree views, charts, and more. A full XML data file that can be used to data bind can be found below.

FAQs

Q: How can I customize which filters are displayed in C1DataFilter?

A: In this tutorial we set AutoGenerateFilters to True. You can set this property to False, and define each filter you wish to display manually in code or XAML. See Types of Filters.

Q: Can the filter be saved for each run of the application?

A: Yes, you can add a save button and use the XML Serialization feature of C1DataFilter to serialize (save) and deserialize (load) the filter. See XML Serialization/Deserialization.

Q: How should the XML file be included with the project?

A: In this tutorial, the XML file is accessed as content as opposed to an embedded resource. It is placed in a folder named "Data" that's included in the project, and the file's BuildAction property is set as content included in project output.

Next Steps

Sample XML Data File

Inventory Data XML

<?xml version="1.0" standalone="yes"?>
<NewDataSet>
  <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Inventory" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Inventory">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="ProductID" type="xs:int" minOccurs="0" />
                <xs:element name="ProductName" type="xs:string" minOccurs="0" />
                <xs:element name="Category" type="xs:string" minOccurs="0" />
                <xs:element name="StockQuantity" type="xs:int" minOccurs="0" />
                <xs:element name="Price" type="xs:double" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <Inventory>
    <ProductID>1</ProductID>
    <ProductName>Desk</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>28</StockQuantity>
    <Price>127.68</Price>
  </Inventory>
  <Inventory>
    <ProductID>2</ProductID>
    <ProductName>Eggs</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>67</StockQuantity>
    <Price>371.2</Price>
  </Inventory>
  <Inventory>
    <ProductID>3</ProductID>
    <ProductName>Smartwatch</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>3</StockQuantity>
    <Price>499.25</Price>
  </Inventory>
  <Inventory>
    <ProductID>4</ProductID>
    <ProductName>Laptop</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>40</StockQuantity>
    <Price>176.26</Price>
  </Inventory>
  <Inventory>
    <ProductID>5</ProductID>
    <ProductName>Board Game</ProductName>
    <Category>Toys</Category>
    <StockQuantity>4</StockQuantity>
    <Price>234.33</Price>
  </Inventory>
  <Inventory>
    <ProductID>6</ProductID>
    <ProductName>RC Car</ProductName>
    <Category>Toys</Category>
    <StockQuantity>78</StockQuantity>
    <Price>185.03</Price>
  </Inventory>
  <Inventory>
    <ProductID>7</ProductID>
    <ProductName>Comic</ProductName>
    <Category>Books</Category>
    <StockQuantity>84</StockQuantity>
    <Price>113.37</Price>
  </Inventory>
  <Inventory>
    <ProductID>8</ProductID>
    <ProductName>Bed</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>73</StockQuantity>
    <Price>167.07</Price>
  </Inventory>
  <Inventory>
    <ProductID>9</ProductID>
    <ProductName>Bed</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>77</StockQuantity>
    <Price>34.91</Price>
  </Inventory>
  <Inventory>
    <ProductID>10</ProductID>
    <ProductName>Milk</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>14</StockQuantity>
    <Price>14.71</Price>
  </Inventory>
  <Inventory>
    <ProductID>11</ProductID>
    <ProductName>Bed</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>18</StockQuantity>
    <Price>194.04</Price>
  </Inventory>
  <Inventory>
    <ProductID>12</ProductID>
    <ProductName>Tennis Racket</ProductName>
    <Category>Sports</Category>
    <StockQuantity>10</StockQuantity>
    <Price>448.12</Price>
  </Inventory>
  <Inventory>
    <ProductID>13</ProductID>
    <ProductName>Magazine</ProductName>
    <Category>Books</Category>
    <StockQuantity>65</StockQuantity>
    <Price>489.14</Price>
  </Inventory>
  <Inventory>
    <ProductID>14</ProductID>
    <ProductName>Novel</ProductName>
    <Category>Books</Category>
    <StockQuantity>71</StockQuantity>
    <Price>206.73</Price>
  </Inventory>
  <Inventory>
    <ProductID>15</ProductID>
    <ProductName>Headphones</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>77</StockQuantity>
    <Price>82.6</Price>
  </Inventory>
  <Inventory>
    <ProductID>16</ProductID>
    <ProductName>Cereal</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>71</StockQuantity>
    <Price>288.15</Price>
  </Inventory>
  <Inventory>
    <ProductID>17</ProductID>
    <ProductName>Smartwatch</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>98</StockQuantity>
    <Price>490.69</Price>
  </Inventory>
  <Inventory>
    <ProductID>18</ProductID>
    <ProductName>Laptop</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>44</StockQuantity>
    <Price>323.06</Price>
  </Inventory>
  <Inventory>
    <ProductID>19</ProductID>
    <ProductName>Jacket</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>37</StockQuantity>
    <Price>445.8</Price>
  </Inventory>
  <Inventory>
    <ProductID>20</ProductID>
    <ProductName>Laptop</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>81</StockQuantity>
    <Price>35.56</Price>
  </Inventory>
  <Inventory>
    <ProductID>21</ProductID>
    <ProductName>Jacket</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>30</StockQuantity>
    <Price>103.86</Price>
  </Inventory>
  <Inventory>
    <ProductID>22</ProductID>
    <ProductName>Jeans</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>2</StockQuantity>
    <Price>90.24</Price>
  </Inventory>
  <Inventory>
    <ProductID>23</ProductID>
    <ProductName>Chair</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>96</StockQuantity>
    <Price>434.61</Price>
  </Inventory>
  <Inventory>
    <ProductID>24</ProductID>
    <ProductName>Bed</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>1</StockQuantity>
    <Price>359.04</Price>
  </Inventory>
  <Inventory>
    <ProductID>25</ProductID>
    <ProductName>Bed</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>12</StockQuantity>
    <Price>72.08</Price>
  </Inventory>
  <Inventory>
    <ProductID>26</ProductID>
    <ProductName>Rice</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>71</StockQuantity>
    <Price>371.23</Price>
  </Inventory>
  <Inventory>
    <ProductID>27</ProductID>
    <ProductName>Hat</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>16</StockQuantity>
    <Price>484.28</Price>
  </Inventory>
  <Inventory>
    <ProductID>28</ProductID>
    <ProductName>Couch</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>87</StockQuantity>
    <Price>286.1</Price>
  </Inventory>
  <Inventory>
    <ProductID>29</ProductID>
    <ProductName>Textbook</ProductName>
    <Category>Books</Category>
    <StockQuantity>60</StockQuantity>
    <Price>406.38</Price>
  </Inventory>
  <Inventory>
    <ProductID>30</ProductID>
    <ProductName>Biography</ProductName>
    <Category>Books</Category>
    <StockQuantity>33</StockQuantity>
    <Price>30.98</Price>
  </Inventory>
  <Inventory>
    <ProductID>31</ProductID>
    <ProductName>Milk</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>58</StockQuantity>
    <Price>239.19</Price>
  </Inventory>
  <Inventory>
    <ProductID>32</ProductID>
    <ProductName>Rice</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>39</StockQuantity>
    <Price>240.45</Price>
  </Inventory>
  <Inventory>
    <ProductID>33</ProductID>
    <ProductName>Bread</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>96</StockQuantity>
    <Price>432.73</Price>
  </Inventory>
  <Inventory>
    <ProductID>34</ProductID>
    <ProductName>Cereal</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>84</StockQuantity>
    <Price>242.86</Price>
  </Inventory>
  <Inventory>
    <ProductID>35</ProductID>
    <ProductName>Bread</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>39</StockQuantity>
    <Price>379.61</Price>
  </Inventory>
  <Inventory>
    <ProductID>36</ProductID>
    <ProductName>Laptop</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>70</StockQuantity>
    <Price>368.59</Price>
  </Inventory>
  <Inventory>
    <ProductID>37</ProductID>
    <ProductName>Smartwatch</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>13</StockQuantity>
    <Price>368.35</Price>
  </Inventory>
  <Inventory>
    <ProductID>38</ProductID>
    <ProductName>Jeans</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>33</StockQuantity>
    <Price>24.46</Price>
  </Inventory>
  <Inventory>
    <ProductID>39</ProductID>
    <ProductName>Jacket</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>21</StockQuantity>
    <Price>81.32</Price>
  </Inventory>
  <Inventory>
    <ProductID>40</ProductID>
    <ProductName>Hat</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>71</StockQuantity>
    <Price>275.94</Price>
  </Inventory>
  <Inventory>
    <ProductID>41</ProductID>
    <ProductName>Milk</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>3</StockQuantity>
    <Price>403.01</Price>
  </Inventory>
  <Inventory>
    <ProductID>42</ProductID>
    <ProductName>Desk</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>6</StockQuantity>
    <Price>414.31</Price>
  </Inventory>
  <Inventory>
    <ProductID>43</ProductID>
    <ProductName>Novel</ProductName>
    <Category>Books</Category>
    <StockQuantity>56</StockQuantity>
    <Price>342.25</Price>
  </Inventory>
  <Inventory>
    <ProductID>44</ProductID>
    <ProductName>Novel</ProductName>
    <Category>Books</Category>
    <StockQuantity>1</StockQuantity>
    <Price>367.54</Price>
  </Inventory>
  <Inventory>
    <ProductID>45</ProductID>
    <ProductName>Hat</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>13</StockQuantity>
    <Price>140.82</Price>
  </Inventory>
  <Inventory>
    <ProductID>46</ProductID>
    <ProductName>Eggs</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>48</StockQuantity>
    <Price>197.28</Price>
  </Inventory>
  <Inventory>
    <ProductID>47</ProductID>
    <ProductName>Rice</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>62</StockQuantity>
    <Price>145.5</Price>
  </Inventory>
  <Inventory>
    <ProductID>48</ProductID>
    <ProductName>Doll</ProductName>
    <Category>Toys</Category>
    <StockQuantity>55</StockQuantity>
    <Price>400.86</Price>
  </Inventory>
  <Inventory>
    <ProductID>49</ProductID>
    <ProductName>Hat</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>34</StockQuantity>
    <Price>460.7</Price>
  </Inventory>
  <Inventory>
    <ProductID>50</ProductID>
    <ProductName>Couch</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>31</StockQuantity>
    <Price>379.7</Price>
  </Inventory>
  <Inventory>
    <ProductID>51</ProductID>
    <ProductName>Board Game</ProductName>
    <Category>Toys</Category>
    <StockQuantity>54</StockQuantity>
    <Price>480.74</Price>
  </Inventory>
  <Inventory>
    <ProductID>52</ProductID>
    <ProductName>Magazine</ProductName>
    <Category>Books</Category>
    <StockQuantity>10</StockQuantity>
    <Price>443.21</Price>
  </Inventory>
  <Inventory>
    <ProductID>53</ProductID>
    <ProductName>Action Figure</ProductName>
    <Category>Toys</Category>
    <StockQuantity>71</StockQuantity>
    <Price>105.77</Price>
  </Inventory>
  <Inventory>
    <ProductID>54</ProductID>
    <ProductName>Helmet</ProductName>
    <Category>Sports</Category>
    <StockQuantity>37</StockQuantity>
    <Price>54.64</Price>
  </Inventory>
  <Inventory>
    <ProductID>55</ProductID>
    <ProductName>Jacket</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>28</StockQuantity>
    <Price>464.35</Price>
  </Inventory>
  <Inventory>
    <ProductID>56</ProductID>
    <ProductName>Yoga Mat</ProductName>
    <Category>Sports</Category>
    <StockQuantity>76</StockQuantity>
    <Price>122.35</Price>
  </Inventory>
  <Inventory>
    <ProductID>57</ProductID>
    <ProductName>Yoga Mat</ProductName>
    <Category>Sports</Category>
    <StockQuantity>62</StockQuantity>
    <Price>478.65</Price>
  </Inventory>
  <Inventory>
    <ProductID>58</ProductID>
    <ProductName>Sneakers</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>34</StockQuantity>
    <Price>70.68</Price>
  </Inventory>
  <Inventory>
    <ProductID>59</ProductID>
    <ProductName>T-Shirt</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>51</StockQuantity>
    <Price>352.35</Price>
  </Inventory>
  <Inventory>
    <ProductID>60</ProductID>
    <ProductName>T-Shirt</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>94</StockQuantity>
    <Price>98.91</Price>
  </Inventory>
  <Inventory>
    <ProductID>61</ProductID>
    <ProductName>Desk</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>59</StockQuantity>
    <Price>93.55</Price>
  </Inventory>
  <Inventory>
    <ProductID>62</ProductID>
    <ProductName>Puzzle</ProductName>
    <Category>Toys</Category>
    <StockQuantity>56</StockQuantity>
    <Price>499.03</Price>
  </Inventory>
  <Inventory>
    <ProductID>63</ProductID>
    <ProductName>Biography</ProductName>
    <Category>Books</Category>
    <StockQuantity>87</StockQuantity>
    <Price>37.35</Price>
  </Inventory>
  <Inventory>
    <ProductID>64</ProductID>
    <ProductName>Bread</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>5</StockQuantity>
    <Price>396</Price>
  </Inventory>
  <Inventory>
    <ProductID>65</ProductID>
    <ProductName>Sneakers</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>20</StockQuantity>
    <Price>148.89</Price>
  </Inventory>
  <Inventory>
    <ProductID>66</ProductID>
    <ProductName>Bread</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>53</StockQuantity>
    <Price>90.25</Price>
  </Inventory>
  <Inventory>
    <ProductID>67</ProductID>
    <ProductName>Eggs</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>42</StockQuantity>
    <Price>203.26</Price>
  </Inventory>
  <Inventory>
    <ProductID>68</ProductID>
    <ProductName>Desk</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>62</StockQuantity>
    <Price>486.87</Price>
  </Inventory>
  <Inventory>
    <ProductID>69</ProductID>
    <ProductName>Smartwatch</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>98</StockQuantity>
    <Price>423.25</Price>
  </Inventory>
  <Inventory>
    <ProductID>70</ProductID>
    <ProductName>Milk</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>42</StockQuantity>
    <Price>202.45</Price>
  </Inventory>
  <Inventory>
    <ProductID>71</ProductID>
    <ProductName>Desk</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>9</StockQuantity>
    <Price>401.93</Price>
  </Inventory>
  <Inventory>
    <ProductID>72</ProductID>
    <ProductName>T-Shirt</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>77</StockQuantity>
    <Price>31.56</Price>
  </Inventory>
  <Inventory>
    <ProductID>73</ProductID>
    <ProductName>Biography</ProductName>
    <Category>Books</Category>
    <StockQuantity>24</StockQuantity>
    <Price>472.78</Price>
  </Inventory>
  <Inventory>
    <ProductID>74</ProductID>
    <ProductName>RC Car</ProductName>
    <Category>Toys</Category>
    <StockQuantity>48</StockQuantity>
    <Price>477.4</Price>
  </Inventory>
  <Inventory>
    <ProductID>75</ProductID>
    <ProductName>Smartwatch</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>26</StockQuantity>
    <Price>71.45</Price>
  </Inventory>
  <Inventory>
    <ProductID>76</ProductID>
    <ProductName>Tennis Racket</ProductName>
    <Category>Sports</Category>
    <StockQuantity>89</StockQuantity>
    <Price>100.23</Price>
  </Inventory>
  <Inventory>
    <ProductID>77</ProductID>
    <ProductName>Football</ProductName>
    <Category>Sports</Category>
    <StockQuantity>26</StockQuantity>
    <Price>304.83</Price>
  </Inventory>
  <Inventory>
    <ProductID>78</ProductID>
    <ProductName>Action Figure</ProductName>
    <Category>Toys</Category>
    <StockQuantity>36</StockQuantity>
    <Price>59.46</Price>
  </Inventory>
  <Inventory>
    <ProductID>79</ProductID>
    <ProductName>Tablet</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>91</StockQuantity>
    <Price>334.19</Price>
  </Inventory>
  <Inventory>
    <ProductID>80</ProductID>
    <ProductName>Milk</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>77</StockQuantity>
    <Price>120.48</Price>
  </Inventory>
  <Inventory>
    <ProductID>81</ProductID>
    <ProductName>Novel</ProductName>
    <Category>Books</Category>
    <StockQuantity>37</StockQuantity>
    <Price>385.35</Price>
  </Inventory>
  <Inventory>
    <ProductID>82</ProductID>
    <ProductName>Chair</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>62</StockQuantity>
    <Price>180.58</Price>
  </Inventory>
  <Inventory>
    <ProductID>83</ProductID>
    <ProductName>Jeans</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>91</StockQuantity>
    <Price>147.05</Price>
  </Inventory>
  <Inventory>
    <ProductID>84</ProductID>
    <ProductName>Action Figure</ProductName>
    <Category>Toys</Category>
    <StockQuantity>82</StockQuantity>
    <Price>372.78</Price>
  </Inventory>
  <Inventory>
    <ProductID>85</ProductID>
    <ProductName>Sneakers</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>99</StockQuantity>
    <Price>487.24</Price>
  </Inventory>
  <Inventory>
    <ProductID>86</ProductID>
    <ProductName>Chair</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>24</StockQuantity>
    <Price>419.64</Price>
  </Inventory>
  <Inventory>
    <ProductID>87</ProductID>
    <ProductName>Puzzle</ProductName>
    <Category>Toys</Category>
    <StockQuantity>2</StockQuantity>
    <Price>278.48</Price>
  </Inventory>
  <Inventory>
    <ProductID>88</ProductID>
    <ProductName>Milk</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>64</StockQuantity>
    <Price>97.02</Price>
  </Inventory>
  <Inventory>
    <ProductID>89</ProductID>
    <ProductName>Textbook</ProductName>
    <Category>Books</Category>
    <StockQuantity>1</StockQuantity>
    <Price>189.67</Price>
  </Inventory>
  <Inventory>
    <ProductID>90</ProductID>
    <ProductName>Smartphone</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>96</StockQuantity>
    <Price>150.49</Price>
  </Inventory>
  <Inventory>
    <ProductID>91</ProductID>
    <ProductName>Doll</ProductName>
    <Category>Toys</Category>
    <StockQuantity>38</StockQuantity>
    <Price>372.18</Price>
  </Inventory>
  <Inventory>
    <ProductID>92</ProductID>
    <ProductName>Laptop</ProductName>
    <Category>Electronics</Category>
    <StockQuantity>34</StockQuantity>
    <Price>32.98</Price>
  </Inventory>
  <Inventory>
    <ProductID>93</ProductID>
    <ProductName>Hat</ProductName>
    <Category>Clothing</Category>
    <StockQuantity>68</StockQuantity>
    <Price>246.21</Price>
  </Inventory>
  <Inventory>
    <ProductID>94</ProductID>
    <ProductName>Cereal</ProductName>
    <Category>Groceries</Category>
    <StockQuantity>46</StockQuantity>
    <Price>39.66</Price>
  </Inventory>
  <Inventory>
    <ProductID>95</ProductID>
    <ProductName>Couch</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>71</StockQuantity>
    <Price>91.18</Price>
  </Inventory>
  <Inventory>
    <ProductID>96</ProductID>
    <ProductName>Puzzle</ProductName>
    <Category>Toys</Category>
    <StockQuantity>19</StockQuantity>
    <Price>370.22</Price>
  </Inventory>
  <Inventory>
    <ProductID>97</ProductID>
    <ProductName>Desk</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>94</StockQuantity>
    <Price>39.17</Price>
  </Inventory>
  <Inventory>
    <ProductID>98</ProductID>
    <ProductName>Biography</ProductName>
    <Category>Books</Category>
    <StockQuantity>11</StockQuantity>
    <Price>366.18</Price>
  </Inventory>
  <Inventory>
    <ProductID>99</ProductID>
    <ProductName>Tennis Racket</ProductName>
    <Category>Sports</Category>
    <StockQuantity>44</StockQuantity>
    <Price>104.33</Price>
  </Inventory>
  <Inventory>
    <ProductID>100</ProductID>
    <ProductName>Chair</ProductName>
    <Category>Furniture</Category>
    <StockQuantity>53</StockQuantity>
    <Price>473.24</Price>
  </Inventory>
</NewDataSet>