Problem In Get Datasource After Filter Sheet by AutoFiltering

Posted by: kianian on 8 September 2017, 2:27 pm EST

  • Posted 8 September 2017, 2:27 pm EST

    Hi,

    I use Auto Filter  on my sheet.

    How I Can get Filtered Datasource. When i call Datasource, retrieves all rows.

    Please Help me

  • Replied 8 September 2017, 2:27 pm EST

    Hello,

    In order to get the filtered data-source you need to query the Database and then retrieve the data accordingly in DataTable or DataSet and then bing it to Spread.

    However, when the AllowAutofilter property is set to true, it allows a column to have a default filter assigned to it through which the user can filter the rows based on all the possible values in dropdown filter in the Column Headerusing the filter indicator wherein the filter list includes all the unique values in cells in this column.

    Hope this will help you. Thanks.

  • Replied 8 September 2017, 2:27 pm EST

    Thank you for your answer.

    My user selects the filter icon of columns header and sets filter(s) to sheet, sheet shows the filtered data, now when get datasource from sheet to CAST to DataTable and print by stimulsoft, datatable contains all records. (not filtered rows)

     sorry for my bad english

  • Replied 8 September 2017, 2:27 pm EST

    Hello,

    Yes it will show up all the records in DataTable which you have casted from the DataSource of Spread.

    In order to get the DataTable only of the filtered spread, you first need to copy the filtered records in a hidden Spread and then cast that filtered Spread into Datatable. Or you can try getting the DataView of the filtered Spread and then convert that DataView of the filtered Spread into Datatable.

    Hope this will help you. Thanks.

Need extra support?

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

Learn More

Forum Channels