02-01-2017 5:20 PM - edited 02-03-2024 8:03 PM
Hi,
I have some users using filter table icon (funnel) to filter grid in my user forms.
I want to iterate all 'filtered' rows to do some operations but i didn't find a way.
Is it possible?
Thank you
Paolo
Hi,
did you solved this situation.. Now i need that too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ozer,
I didn't find a solution.
I just came up disabling funnel icon and implementing by myself the filters I needed.
Didn't check if now SDK provide some ways to approach the issue.
Hi Paolo,
Maybe this is not a good option, but you can do something like this:
1. Replace you grid by a matrix control.
2. Bind your columns with the columns of your datatable.
The you can use a code like this:
SAPbouiCOM.Matrix oMtx = oForm.Items.Item("your mtx").Specific;
for (int i = 1; i <= oMtx.VisualRowCount; i++)
{
string value = (oMtx.Columns.Item("your column id").Cells.Item(i).Specific).Value;
}
With matrix the visible rows will be the first lines. Then iterate just until the value of property VisualRowCount, and read the values directly from matrix. This method can be slow depending the number of registers.
Hope it helps.
Kind Regards,
Diego Lother
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paolo,
The datatable will always contain all the rows. The "filter" is only visual. So what I was proposing is that you iterate over the rows on the grid and use the function above to get the index of that row on the datatable. The function acts like a map between the index you seen on screen (the row index) and the index of the data row (the row on the datatable).
Again note that I haven't tested if the function in question takes into consideration the filter.
Pedro Magueija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.