# VirtualModeData column sorting, vertical scroll bar and Page Up and Down key

**URL:** <https://support.steema.com/t/virtualmodedata-column-sorting-vertical-scroll-bar-and-page-up-and-down-key/16875>\
**Category:** .NET\
**Created:** [July 15, 2020, 11:02am UTC](https://support.steema.com/t/virtualmodedata-column-sorting-vertical-scroll-bar-and-page-up-and-down-key/16875 "2020-07-15T11:02:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![uavalero89065](https://support.steema.com/letter_avatar_proxy/v4/letter/u/e36b37/32.png) [@uavalero89065](https://support.steema.com/u/uavalero89065)\
**Post date:** [July 15, 2020, 11:02am UTC](https://support.steema.com/t/virtualmodedata-column-sorting-vertical-scroll-bar-and-page-up-and-down-key/16875/1 "2020-07-15T11:02:55Z")

</div>

I’m using VirtualModeData mapping a two dimension string array.

I need to sort the columns and I can’t see any sample about doing it.

How do vertical scroll bar interacts with cursor row position? What are this data represents?

```plaintext
                tGrid1.ScrollBars.Vertical.Maximum = ??;
                tGrid1.ScrollBars.Vertical.SmallChange = ??;
                tGrid1.ScrollBars.Vertical.LargeChange = ??;

```

The Key Page Up moves the cursor row up 10 rows. Where is the number of rows to move set?  
The Key Page Down moves the cursor row to row number 11. This is not normal!!

---

<div class="post-metadata">

**Author:** ![Marc](https://support.steema.com/user_avatar/support.steema.com/marc/32/7997_2.png) [@Marc](https://support.steema.com/u/Marc)\
**Post date:** [July 24, 2020, 10:13am UTC](https://support.steema.com/t/virtualmodedata-column-sorting-vertical-scroll-bar-and-page-up-and-down-key/16875/2 "2020-07-24T10:13:48Z")

</div>

Hello,

Apologies for the delay with this reply.

Please look at this example location:

> **[TeeGrid-for-.NET/Sorting at master · Steema/TeeGrid-for-.NET](https://github.com/Steema/TeeGrid-for-.NET/tree/master/Sorting)**
>
> Sample programs showing how to use TeeGrid for .NET CSharp in Windows Forms. - Steema/TeeGrid-for-.NET

The SortableColumns example includes a VirtualDataset.

We’ll follow up with a reply to te second part of your question.

Regards,  
Marc Meumann

---

<div class="post-metadata">

**Author:** ![Marc](https://support.steema.com/user_avatar/support.steema.com/marc/32/7997_2.png) [@Marc](https://support.steema.com/u/Marc)\
**Post date:** [July 24, 2020, 12:05pm UTC](https://support.steema.com/t/virtualmodedata-column-sorting-vertical-scroll-bar-and-page-up-and-down-key/16875/3 "2020-07-24T12:05:11Z")

</div>

Hello,

Re. “The Key Page Up moves the cursor row up 10 rows. Where is the number of rows to move set?”  
That is currently fixed at 10. We’ll add a property to control that. ([http://bugs.teechart.net/show\_bug.cgi?id=2352](http://bugs.teechart.net/show_bug.cgi?id=2352))

Re. The Key Page Down moves the cursor row to row number 11. This is not normal!!  
My interpretation is that the cursor is already at row 1 so moves 10 to row 11. We can review that, I see another issue here, that the page-down doesn’t continue beyond the first jump ([http://bugs.teechart.net/show\_bug.cgi?id=2351](http://bugs.teechart.net/show_bug.cgi?id=2351)). We’ll fix that and review related functionality.

Re. “tGrid1.ScrollBars”  
Yes, these are using standard Windows Forms Scrollbars. I agree that their use is not clear. We’ll clarify that for the next build release.

Regards,  
Marc
