Kees Moezelaar
2025-07-18T07:56:00Z
I use the igrid in a vb6 program, when a column is clicked i sort by rebuilding a query and fill the grid again. When I do this in the vb6 environment the horizontal scroll position but in the compiled program the grid goes back to the first column to the left.
Kees Moezelaar
2025-07-18T09:14:01Z
I found out that this only happens when I compile the program with a .manifest, so i can use side by side.
I need to comple it this way, bacause I do not always have administrative rights on the users computer to install the ocx in windows.
Igor/10Tec
2025-07-18T14:30:14Z
It's not clear what this unfinished phrase means: "When I do this in the vb6 environment the horizontal scroll position"

Did you mean to write that the position of the scroll box on the horizontal scroll bar does not remain the same after filling the grid?

You can read the value of the iGrid.VScrollBar.Value property to know the current position of the scroll box and save it in a variable before filling the grid. Then you can restore the scroll box position after filling by assigning the value of the variable to the iGrid.VScrollBar.Value property.
Kees Moezelaar
2025-07-18T14:34:44Z
Thanks,

I found the solution I just have to use the hscrollbar.value than it works like a charm 🙂 In the code they use some api calls to do the same, that is why the strange behavior. I replaced them with the simple hscrollbar.value command.