Need to add an excel type filtering method for product inventory at work.

  1. #1

    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

    Click image for larger version. 

Name:	2.jpg 
Views:	25 
Size:	70.3 KB 
ID:	24805

    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.
  2. #2

    Tried this?

  3. #3
    @xDroid
    Thanks for your replied.But I want to filtering not sorting.

Similar Threads

  1. Filtering like Excel
    By Kerry in forum 3.x Help
    Replies: 0
    Last Post: Dec 20, 2016, 4:55 AM
  2. [CLOSED] Filtering a store with a ModelField of Type Object
    By csfesta in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 18, 2013, 4:40 AM
  3. Replies: 0
    Last Post: Nov 12, 2013, 8:08 PM
  4. Replies: 0
    Last Post: May 11, 2010, 10:35 PM
  5. Filtering Can't work in store
    By syed2uk in forum 1.x Help
    Replies: 1
    Last Post: Jan 19, 2010, 5:02 AM

Posting Permissions