Dec 29, 2016, 5:31 AM
Need to add an excel type filtering method for product inventory at work.
Hey Guys,
I need some help at work. We are trying to build a searchable database for our inventory at work, but we need to add a Filtering method like excel provides so that we can select 2 or more items at the same time. Not sure how to go about adding this feature in. Any help will be greatly appreciated.
Here is the code I am working with right now. Thanks.
Visual Studio 2010 Pro
Ext.net 3.5
Windows 8 Pro
.net framework 4.5
It's didn't work.
I need some help at work. We are trying to build a searchable database for our inventory at work, but we need to add a Filtering method like excel provides so that we can select 2 or more items at the same time. Not sure how to go about adding this feature in. Any help will be greatly appreciated.
Here is the code I am working with right now. Thanks.
Visual Studio 2010 Pro
Ext.net 3.5
Windows 8 Pro
.net framework 4.5
It's didn't work.
<ext:Store ID="Store_Inventory" runat="server">
<Model>
<ext:Model ID="Model1" runat="server" >
<Fields>
<ext:ModelField Name="Colour" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:Store ID="Store_Filter" runat="server">
<Model>
<ext:Model ID="Model2" runat="server" >
<Fields>
<ext:ModelField Name="Colour" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:GridPanel ID="GridPanel1" runat="server" StoreID="Store_Inventory" Title="" Width="" Height="600" AutoScroll="True" >
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ID="Column3" runat="server" Header="Colour" Width="150" Sortable="true" DataIndex="Colour"/>
</Columns>
</ColumnModel>
<Features>
<ext:GridFilters runat="server" ID="GridFilters1" Local="true" Height="200">
<Filters>
<ext:ListFilter DataIndex = "Colour" StoreID="Store_Filter" LabelField="Colour" />
</Filters>
</ext:GridFilters>
</Features>
</ext:GridPanel>
Protected Sub ShowData()
Dim temp_string As String
temp_string = "SELECT * FROM [T - Inventory]"
HK_Pro.Open()
rd_select.Close()
Dim daTT As New SqlDataAdapter(temp_string, HK_Pro)
Dim dsTT As New Data.DataSet
dsTT.Clear()
daTT.Fill(dsTT, "dw")
Me.Store_Inventory.DataSource = dsTT
Me.Store_Inventory.DataMember = "dw"
Me.Store_Inventory.DataBind()
HK_Pro.Close()
End If
End Sub
Protected Sub Showfilter()
Dim temp_string As String
temp_string = "SELECT Colour FROM [T - Inventory] GROUP BY Colour"
HK_Pro.Open()
Dim daTT As New SqlDataAdapter(temp_string, HK_Pro)
Dim dsTT As New Data.DataSet
dsTT.Clear()
daTT.Fill(dsTT, "dw")
Me.Store_Filter.DataSource = dsTT
Me.Store_Filter.DataMember = "dw"
Me.Store_Filter.DataBind()
HK_Pro.Close()
Last edited by Kerry; Dec 29, 2016 at 5:56 AM.