Row filter problem

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

  • Posted 8 September 2017, 1:56 pm EST

    <P>I'm using fpsread 4.0.3510.2008  to edit large amount of data (50col * 1000 row) within a vb.net form</P>
    <P>Here's my problem.  </P>
    <P>I filter a column (x) on a value. I edit another column (y).</P>
    <P>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.</P>
    <P>I have to close and reopen the filter each time.</P>
    <P>Any idea?</P>
    <P> </P>
    <P> </P>
  • Replied 8 September 2017, 1:56 pm EST

    <P>Hello,</P>
    <P>Using same version of Spread, I am not able to replicate the issue, I used the data with over 1000 Rows & 37 Columns.</P>
    <P> 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).</P>
    <P>I would really appreciate if you could post us a small zipped sample project that can help us to identify the issue.</P>
    <P> </P>
    <P>Regards,</P>
    <P> </P>
    <P> </P>
    <P> </P>
  • Replied 8 September 2017, 1:56 pm EST

    <P>Hi, </P>
    <P>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)</P>
    <P>I don't have this problem on small filter list.</P>
  • Replied 8 September 2017, 1:56 pm EST

    <P> </P>
    <P>Hello,</P>
    <P>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.</P>
    <P> </P>
    <P>Thanks,</P>
    <P> </P>
    <P> </P>
    <P> </P>
  • Replied 8 September 2017, 1:56 pm EST

    <P>Hi,</P>
    <P>the only code i'm using (after databound)  :</P><FONT size=2><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>For</FONT></FONT><FONT size=2> i </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Integer</FONT></FONT><FONT size=2> = 0 </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>To</FONT></FONT><FONT size=2> FpSpread1.Sheets(0).ColumnCount.ToString - 1<BR>     FpSpread1.Sheets(0).Columns(i).AllowAutoFilter = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True<BR></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Next</FONT></FONT></P>
    <P><FONT color=#0000ff size=2><FONT color=#0000ff size=2><FONT color=#000000>I have multiple header (2)</FONT></FONT></FONT></P>
    <P>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. </P>
    <P> </P>
    <P><FONT color=#0000ff size=2><FONT color=#0000ff size=2><FONT color=#000000></FONT> </P></FONT></FONT></FONT>
  • Replied 8 September 2017, 1:56 pm EST

    <P>Hello,</P>
    <P>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.</P>
    <P>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.</P><FONT size=2>
    <P>FpSpread1.Sheets(0).ColumnHeaderRowCount = 3</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> conStr </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>String</FONT></FONT><FONT size=2> = </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"Provider=Microsoft.JET.OLEDB.4.0;data source=D:\Program Files\Microsoft Visual Studio\VB98\Biblio.mdb"</P></FONT></FONT><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> sqlStr </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>String</FONT></FONT><FONT size=2> = </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"SELECT * FROM Publishers"</P></FONT></FONT><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> conn </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> System.Data.OleDb.OleDbConnection = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> System.Data.OleDb.OleDbConnection(conStr)</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> ds </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> DataSet = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> DataSet()</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> daCust </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> System.Data.OleDb.OleDbDataAdapter = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> System.Data.OleDb.OleDbDataAdapter(sqlStr, conn)</P>
    <P>daCust.Fill(ds, </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"Publishers"</FONT></FONT><FONT size=2>)</P>
    <P>FpSpread1.Sheets(0).DataSource = ds</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>For</FONT></FONT><FONT size=2> i </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Integer</FONT></FONT><FONT size=2> = 0 </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>To</FONT></FONT><FONT size=2> FpSpread1.Sheets(0).ColumnCount.ToString - 1</P>
    <P>FpSpread1.Sheets(0).Columns(i).AllowAutoFilter = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True</P></FONT></FONT><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Next<BR></FONT></FONT></P>
    <P><FONT color=#0000ff size=2><FONT color=#0000ff size=2> </P></FONT></FONT>
    <P>Regards,</P>
    <P> </P>
  • Replied 8 September 2017, 1:56 pm EST

    <P>Hi,</P>
    <P>I've start a new project with only this code :</P><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> daExcelExport </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> SqlDataAdapter</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> dsfilter1 </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> DataTable</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Try</P></FONT></FONT><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> MyCommand </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> SqlCommand</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Dim</FONT></FONT><FONT size=2> conCurrent </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> SqlClient.SqlConnection</P>
    <P>conCurrent.ConnectionString = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"data source=*****;initial catalog=*****;User ID=*****;Password=*****;Connect Timeout=2500"</FONT></FONT><FONT size=2> </FONT></P>
    <P><FONT size=2>MyCommand = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> SqlCommand(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"select * from MK09 order by seq,[project type],Hop#"</FONT></FONT><FONT size=2>, conCurrent)</P>
    <P>MyCommand.CommandTimeout = 1500</P>
    <P>daExcelExport = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>New</FONT></FONT><FONT size=2> SqlDataAdapter(MyCommand)</P>
    <P>daExcelExport.Fill(dsfilter1)</P>
    <P>FpSpread1.DataSource = dsfilter1</P>
    <P>FpSpread1.ActiveSheet.ColumnHeader.Rows(0).Height = 40</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Catch</FONT></FONT><FONT size=2> ex </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> System.Exception</P>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>End</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Try</P></FONT></FONT><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>For</FONT></FONT><FONT size=2> i </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>As</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Integer</FONT></FONT><FONT size=2> = 0 </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>To</FONT></FONT><FONT size=2> FpSpread1.Sheets(0).ColumnCount.ToString - 1</P>
    <P>FpSpread1.Sheets(0).Columns(i).AllowAutoFilter = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>True</P></FONT></FONT><FONT size=2>
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Next</FONT></FONT></P>
    <P><FONT color=#0000ff size=2><FONT color=#0000ff size=2></FONT></FONT> </P>
    <P><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Still have the same 2 problems.</FONT></FONT></P>
    <P><FONT color=#0000ff size=2><FONT color=#0000ff size=2>Wich version of fpSpread are you using?</P></FONT></FONT>
  • Replied 8 September 2017, 1:56 pm EST

    <P>Hello,</P>
    <P>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.</P>
    <P> </P>
    <P> </P>
    <P>Regards,</P>
Need extra support?

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

Learn More

Forum Channels