• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 716
  • Last Modified:

freeze coloume in a grid

I use PB 6.51
How do I freeze say 1st 2 coloum in a grid type data window from scrolling during a horizontal scroll

Help urgently requested
0
kathotia
Asked:
kathotia
1 Solution
 
BhattiCommented:
Sometime happened that we can't find some fuctions and properties to solve such prblems.
It may exist function or property to freez columns like EXCEL Sheet in PB, but I never meet such situation.

If realy not exist such functions or properties, then we need some tricks.

Make two datawindows
One with these first two columns and second with the rest columns.
Placed them side by side.
Put a scroll bar for second datawindow.

First two column will remain freez.

If you need some special records to make report make a third datawindow to use for such perpose.


Best regards

Bhatti
0
 
kathotiaAuthor Commented:
bhatti:

good sugestion! but, if the number of rows is more than displayed at a time how do is syncronise the vertical scroll of the first datawindow
0
 
BhattiCommented:
Do the following:

In the scrollverticle Event of the datawindow where you want to scroll:

// Instance variable
string is_lastrow

is_lastrow = dw_1.Object.Datawindow.LastRowOnPage // If it is dw_1
RETURN 0

// say dw_2 is the datawindow which is freezed8with two columns)

LONG   ll_row

ll_row = LONG(is_lastrow)
dw_2.ScrollToRow(ll_row)

Lastrowonpage property will tell you the last row number on the window where you have a scrollbar and when scrollvertical event occured then other datawindow will be scrolled to the row as have the datawindow ith scrolbar.

Try it may this help.


I am sure it will work.
Please let me know, Now I am busy and can't test it.
If you have any question please let me know.

Best regards


Bhatti
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
BhattiCommented:
Please let me know is it working.

If not, let me knoe the abort position.


Thanks

Best regards

Bhatti
0
 
kathotiaAuthor Commented:
Bhatti:

Your suggestion was tried out, dw_2 does scroll but there is no scyncronisation between the verticle scrolling of the two data windows.
0
 
BhattiCommented:
What do u mean by "no scyncronisation between the verticle scrolling of the two data windows. "


Bhatti
0
 
levrCommented:
http://www.dw-extreme.com/
here are some examples. worth to take a look.
Lev
0
 
ptbarnumCommented:
You can set SplitScoll On and manually or programtically set the position of the split scroll.  In 7.0 the split scroll is set in the preview pane, by dragging the black bar at the left of the horizontal scroll bar to the desired position. In 6.5.1 it may be a property that can be set in the gui but I'm sure it can be set via dot notatin dw_1.datawindow.splitscroll = 1.
0
 
NiemandCommented:
What about in PowerBuilder 8.0?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now