on 02-20-2013 2:38 PM
Hey,
CV_FIRST_VISIBLE_ROW is set in my GET_DATA method correct. When I indicate that there were some data changes via EV_DATA_CHANGED, the list automatically scrolls to the top after processing the method. I have no clue where this behavior come from. I want the list to keep the scrollbar where it was!
Any suggestions?
Kind Regards
Hi Josua:
Have you fixxed this problem? I just met the same problem, no matter what I do, the scrollbar will go back the top of the table. If you find the solution, could you sent it to me via Email 250765745@qq.com, thanks a lot.
Best regards
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Josua,
You have to set CV_LEAD_INDEX also along with the CV_FIRST_VISIBLE_ROW .
Because by default CV_LEAD_INDEX is 1 , so if you are changing CV_FIRST_VISIBLE_ROW equal to your required row , then same lead selection you have to assign into your CV_LEAD_INDEX .
Surely it will work..
Thanks & Regards
Praveen Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
that completely changes the behaviour of my application. I want to keep the selected row selected - not changing the lead index to first visible row.
Lets assume I
Any ideas?
EDIT:
I found out, that this behaviour disappears when I deactivate the sorting and the filtering in GET_DEFINITION. But I need the functionality to filter/sort!
Hi,
Yaa you should not alllow sorting when you are doing changes and want specific row to be selected.
See there is one entry in CT_SELECTED_LINES what index is setted there and you are setting CV_FIRSTVISIBLE_ROW = 3 then CV_LEAD_INDEX also should be set 3 then only after change your selected line focus and first visible row 3 will appear into your application screen.
Check if there is any problem due to the EV_SELECTED_LINE_CHANGED means it't doesn't have any value.
Thanks & Regards
Praveen Gupta
Im sorry but I don't understand this sentence.
Praveen Gupta wrote:
See there is one entry in CT_SELECTED_LINES what index is setted there and you are setting CV_FIRSTVISIBLE_ROW = 3 then CV_LEAD_INDEX also should be set 3 then only after change your selected line focus and first visible row 3 will appear into your application screen.
So either I allow sorting and have a wrong behaviour or I don't allow sorting and have a right behaviour?
Hi Josua,
In your snap shot CT_SELECTED_LINES is having 1 entry. First check in the selected line table what is the index number. if it is not equal to what you have set in CV_FIRST_VISIBLE_ROW.
Might be in your ct_selected_lines will be having 1, that's why cursor is going up.
I think sorting should not be the problem whenever you are changing the table record.
Set your CV_FIRST_VISIBLE_ROW and CV_LEAD_INDEX.
It will work surely..
Thanks
Praveen Gupta
Sorry, Praveen but all the values are fine in the debugger =/ Have a look at the screens below:
This is how my table looks like after I've selected a row in the middle - now I'm triggering a change in a GUIBB Form
Setting ct_data and ev_data_changed
The correct row is selected in CT_SELECTED_LINES
First visible row is also fine
Lead index is perfect - exactly what I have selected
This is how my table looks like after the change
The scroll bar is at the top and so the selected line is no longer visible as long as the user doesn't scroll down.
Everything is fine and works as expected - except the scroll bar - the scroll bar is going to the top somehow.
Maybe we should keep in mind that in this scenario, sorting is allowed on columns. If i disable the sorting, the scroll bar doesnt
scroll to the top.
Hi Josua,
There is conflict in the value of CV_FIRST_VISIBLE_ROW.
As per your code assign CV_FIRST_VISIBLE_ROW = 9.
That's what i am telling , you have to assign same value to the CV_FIRST_VISIBLE_ROW and CV_LEAD_INDEX.
Try with assigning the same value it will work...Your scroll will not go up..
Thanks & Regards
Praveen Gupta
Hi,
if you are setting first visible row is 6 it doesn't mean that your 6th row will be the first row which will be selected and rest of the record will come.
It will come at 3-4th position when render.
Suppose if you have set your minimum row display variable as a 5.
Then you are making up first visible row as 6th ..Then it will appear at 3or 4th position in your table it will not appear as a 1st row which you have set visible.
Thanks & Regards
Praveen Gupta
I know that first visible row != lead index. But the value of first visible row - which comes from the framework - is not working as it is expected.
You are describing the correct behavior, how it should work but unfortunately it doesn't do so.
May I show you what I mean in a live debugging session? 5-10 minutes?
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.