Row filter problem

Posted by: projectik-fp on 8 September 2017, 1:56 pm EST

  • Posted 8 September 2017, 1:56 pm EST

    I'm using fpsread 4.0.3510.2008  to edit large amount of data (50col * 1000 row) within a vb.net form


    Here's my problem. 


    I filter a column (x) on a value. I edit another column (y).


    When i click to remove or change the filter on col x, the list appear by it doesn't work. I can click on any value, nothing happend.


    I have to close and reopen the filter each time.


    Any idea?


     


     

  • Replied 8 September 2017, 1:56 pm EST

    Hello,


    Using same version of Spread, I am not able to replicate the issue, I used the data with over 1000 Rows & 37 Columns.


     I filtered a Column(x) on a value, I make changes in another column(y), again I tried to open the Filter List to remove or change the filter, and it works fine for Column(x).


    I would really appreciate if you could post us a small zipped sample project that can help us to identify the issue.


     


    Regards,


     


     


     

  • Replied 8 September 2017, 1:56 pm EST

    Hi,


    I forgot to mention that my filter was on a col with different data for each row. (i have 1000 result in my filter combo)


    I don't have this problem on small filter list.

  • Replied 8 September 2017, 1:56 pm EST

     


    Hello,


    Are you using a custom filter? I tested it exactly the way you described and it is working fine here.I have a filter list with 1000 of items and it does allow to change or remove the filter from that column.Please post a zipped sample project for us to debug.


     


    Thanks,


     


     


     

  • Replied 8 September 2017, 1:56 pm EST

    Hi,


    the only code i'm using (after databound)  :


    For i As Integer = 0 To FpSpread1.Sheets(0).ColumnCount.ToString - 1
         FpSpread1.Sheets(0).Columns(i).AllowAutoFilter =
    True
    Next


    I have multiple header (2)


    I think i have another mistake. If I filter on column x and edit a cell in column x, the filter refresh on cell changed. So the row i've just edited was removed from filtered view.


     


     

  • Replied 8 September 2017, 1:56 pm EST

    Hello,


    I used the same code posted by you to apply filter to all the columns after setting up the connection with the DataSource.It works fine, the edited Row is not being removed from filter view.


    Below is the code to bound spread to a data table and applying filter to it.Please let me know if I am missing something.


    FpSpread1.Sheets(0).ColumnHeaderRowCount = 3


    Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=D:\Program Files\Microsoft Visual Studio\VB98\Biblio.mdb"


    Dim sqlStr As String = "SELECT * FROM Publishers"


    Dim conn As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(conStr)


    Dim ds As DataSet = New DataSet()


    Dim daCust As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(sqlStr, conn)


    daCust.Fill(ds, "Publishers")


    FpSpread1.Sheets(0).DataSource = ds


    For i As Integer = 0 To FpSpread1.Sheets(0).ColumnCount.ToString - 1


    FpSpread1.Sheets(0).Columns(i).AllowAutoFilter = True


    Next


     


    Regards,


     

  • Replied 8 September 2017, 1:56 pm EST

    Hi,


    I've start a new project with only this code :


    Dim daExcelExport As SqlDataAdapter


    Dim dsfilter1 As New DataTable


    Try


    Dim MyCommand As SqlCommand


    Dim conCurrent As New SqlClient.SqlConnection


    conCurrent.ConnectionString = "data source=*****;initial catalog=*****;User ID=*****;Password=*****;Connect Timeout=2500"


    MyCommand = New SqlCommand("select * from MK09 order by seq,[project type],Hop#", conCurrent)


    MyCommand.CommandTimeout = 1500


    daExcelExport = New SqlDataAdapter(MyCommand)


    daExcelExport.Fill(dsfilter1)


    FpSpread1.DataSource = dsfilter1


    FpSpread1.ActiveSheet.ColumnHeader.Rows(0).Height = 40


    Catch ex As System.Exception


    End Try


    For i As Integer = 0 To FpSpread1.Sheets(0).ColumnCount.ToString - 1


    FpSpread1.Sheets(0).Columns(i).AllowAutoFilter = True


    Next


     


    Still have the same 2 problems.


    Wich version of fpSpread are you using?

  • Replied 8 September 2017, 1:56 pm EST

    Hello,


    I am using Spread 4.0.3510.2008 for Windows Forms.I Would really appreciate if you could post a small zipped project along with the data table that you are using in this case for us to debug.Make sure that the size of the zipped project doesn't exceed 256K.As the issue is still not replicable.


     


     


    Regards,

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels