Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Column Moving in Grid Datawindow

1,843 views
Skip to first unread message

senthil sakthivel

unread,
Jul 9, 2004, 5:36:02 AM7/9/04
to
Hi ,

I am using grid datawindow in my application. After retrieving data i am
moving (changing the display order) the columns. That's working fine.
If i retrieve the data again column display order goes back to original, is
there any i can keep column display order as i changed.

could you please help me in this regard

thanks in advance

senthil s


Bruce Armstrong [TeamSybase]

unread,
Jul 9, 2004, 9:18:51 AM7/9/04
to
Re-retrieving the data won't reset the column order. But reassigning
the dataobject or closing and reopening the window would. Unless
you're using something like the PFC preferences service, there's
nothing that saves the changes in the grid layout between uses.

On 9 Jul 2004 02:36:02 -0700, "senthil sakthivel"
<senthil.s...@isoftplc.com> wrote:

Bruce Armstrong [TeamSybase]
http://www.teamsybase.com

Two new books on developing with PowerBuilder
http://www.pb9books.com?source=newsgroups

Need code sample? Check out CodeXchange:
http://www.codexchange.sybase.com

Preach the gospel at all times. If necessary, use words. - Francis of Assisi
http://www.needhim.org

---------------------------------------------------------------------
DISCLAIMER:

This newsgroup message is only intended for the recipient. Given that it
is a posting to a public newsgroup, that means if you can read this
message then you are the recipient. This message may contain information
that is confidential and protected from disclosure. And then again,
it may not.

Given that TeamSybase members are not employees of Sybase, the contents
of this message do not necessarily represent the views or policies of
Sybase. Given that TeamSybase is a diverse group of users of Sybase
products, the contents of this message do not necessarily represent the
views of a significant number of the members of TeamSybase. Given that the
author has mutliple personalities and hears voices in his head, the contents
of this message do not necessarily represent his own views.

Jason

unread,
Jul 9, 2004, 10:06:24 AM7/9/04
to
Senthil,

The column order in the grid datawindow is based on the order of the
columns in the sql.

I've written an app that includes functionality to save the column
order (after a user has changed it from the default) to a text file
and I also give the user the ability to save a name to that 'column
view'. They can then load different 'column views' and apply them to
their datawindow. (This has gone over so well that I'm moving the
data from a text file into a database table and applying the
functionality to other grid datawindows.)

To make this work you first have to set the visible attribute for all
columns to be FALSE (0). Then reset the visible attribute to be TRUE
(1) on a column by column basis in the order you want the columns
displayed.

Hope this helps.

- Jason
<><

sss...@gmail.com

unread,
Jul 22, 2014, 6:25:26 AM7/22/14
to
http://eric.aling.tripod.com/PB/tips/pbtip04.htm

From Above easy solution

With GRID datawindows, after you have created your initial datawindow, you can't switch columns easily as you can with other datawindow types. However, you can do this at runtime by clicking on a columnheader, and dragging it to another position. If you put the datawindow in preview mode, you are also able to do this. When going back to design mode, you'll see that the changes are reflected to the design as well. Neat and very handy if you know this.

Secondly, everything you do in preview mode will be reflected in design mode. You can use this feature for resizing columns, moving columns, even moving columns underneath eachother.

Brage Mogstad

unread,
Aug 4, 2023, 8:30:32 AM8/4/23
to
Just to make things clear,
To make those changes mentioned by Eric above, to appear in your dwo,
simply rearrange the columns as Eric suggests, then,
get the modified dwo syntax in a ex. a button with a describe code:

string ls_data_syntax
ls_data_syntax = idw.Describe("Datawindow.Syntax")

The changes you just made should be reflected in the datawindow syntax, thus its just to right click the datawindow,
open in Edit Source mode, and paste the new syntax into the source. Save back, and the columns should be perfectly
rearranged as reflected by the changes you made runtime.

Regards
Brage
0 new messages