Tommyworker
2017-01-30T08:06:08Z
Hello Igor,
if i sort the filtered rows by clicking an header, i get over igAFM.filteredrowcount then count of the Filtered rows,
and i try to export the filtered Rows over

for i = 0 to igafm.FilteredRowcount -1
iGrid.cells(i,0).value
next

the values of the export are nor the values that i see in the grid.
Whats my fault?

Regard Thomas
Igor/10Tec
2017-01-30T16:06:53Z
The FilteredRowCount property of AutoFilterManager indicates how many rows are VISIBLE in the grid after the last filtering operation. AFM just hides the rows not matching the filter criteria by setting their Visible property (iGRow.Visible) to False. The code that does what you need should look like this:

For i = 1 To iGrid1.Rows.Count
   If iGrid1.Rows(i).Visible Then
      ' Export the row with the index 'i'
   End If
Next
Tommyworker
2017-01-30T17:40:24Z
Hello Igor thank you for the fast help..
But i did Folowing:
Loading the Data into the Grid.
Then using the igAFM select all Records 2016
Then sort the second Col "Monat" ASC
After this i get the view:
Grid_Filtered_and_Sorted.PNG

Click to View Image70 View(s)

CSV_Export_From_Grid.PNG

Click to View Image68 View(s)


The to List are not matching???
I tryed the same code in the export i allways get one DS from the year 2017??
Regards Thomas

Igor/10Tec
2017-01-31T08:58:11Z
It's not clear what your code does from this description. Can you prepare a sample that demonstrates the issue?
Tommyworker
2017-01-31T09:03:49Z
Hello Igor, here it is.
IGridExport_20170131.PNG

Click to View Image80 View(s)


The code reads all Visible cells and creates a String with delimeters.
In the grid view you see that after AFM selection and sorting
the wished data 2016 and in order asc the month. That is waht i want to get
if i export the visible Rows, but.. i dont get the same ?? What is my fault?
Igor/10Tec
2017-02-03T08:30:32Z
Thank you for the sample you sent to our support email. As I thought, the problem was in the loop to enumerate filtered rows. It should look like this:

For i = 0 To iGrid1.Rows.Count - 1
   If iGrid1.Rows(i).Visible Then
      ' Export the row with the index 'i'
   End If
Next

Note: there is a small problem in the code snippet I placed above. Sure, we should enumerate rows from 0 to iGrid1.Rows.Count - 1, not from 1 to iGrid1.Rows.Count. I confused iGrid.NET with iGrid ActiveX when writing the answer above. Sorry, I need to support both versions of iGrid - in iGrid almost all indices are 1-based (VB6's standard).