How to get ID of dcbrowsecol?

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

How to get ID of dcbrowsecol?

#1 Post by skiman »

Hi,

I want to determine in which column someone clicked.

I did this with oBrowse:colpos. This works but when I add the ability to MOVE columns, this won't work anymore. I thought to use the ID clause to determine the ID of a column.

nCol := oBrowse:colpos
oCol:= obrowse:getColumn(nCol)

I expected to use oCol:ID, but this doesn't exist. I can add this to the class, but maybe there is an easier way?
Best regards,

Chris.
www.aboservice.be

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: How to get ID of dcbrowsecol?

#2 Post by reganc »

Couldn't you just add the column ID in the cargo slot and then query that?
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: How to get ID of dcbrowsecol?

#3 Post by rdonnay »

Try this:

Code: Select all

nCol := oBrowse:colpos
oCol:= obrowse:getColumn(nCol)
cID := GetList[AScan(GetList,{|a|a[oGETLIST_OBJECT==oCol}),cGETLIST_ID]
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: How to get ID of dcbrowsecol?

#4 Post by skiman »

Hi,

Code: Select all

cID := GetList[AScan(GetList,{|a|a[oGETLIST_OBJECT]==oCol}),cGETLIST_ID]
Works perfect.
Best regards,

Chris.
www.aboservice.be

Post Reply