forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with Table element click function

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
yolodrew
Newbie


Joined: 09 Mar 2009
Posts: 5
Location: Tehachapi, CA

PostPosted: Mon Mar 09, 2009 6:10 am    Post subject: Help with Table element click function Reply with quote

Hello, I think this is a simple question and I apologize if it has already been covered, but I've searched the forums and I'm stumped. Here is my dilemma, I've created a table dialog element using the following syntax:

DIALOG ADD,TABLE,LIST1,160,26,753,393,Tractlot[75]|Owner[170]|Address[60]|Lotparcel[110]|Home Phone[87]|Work Phone[87]|Tenant[140],,CLICK,COLUMNSORT,style1

And I'm trying to catch any click events with the following:

:list1click
%%ITEM = @item(list1)
if @not(@null(%%ITEM))
info %%ITEM
END

This works well if you click on the first column in the table, in this case "Tractlot", if you click on any other column the click event (%%ITEM) is null, is there any way I can extract the data in the first column in a row that is clicked on to populate the click event, regardless of which column you click on in a single row?

I am using @tab() to populate the table list. eg. :
LIST ADD,list1,%%TRACTLOT@tab()%%OWNERNAME@tab()%%ADDRESS@tab()%%LOTPARCEL@tab()%%HOMEPHONE@tab()%%WORKPHONE@tab()%%TENANT

Any guidance is very much appreciated.

Thank you.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Mar 09, 2009 2:19 pm    Post subject: Reply with quote

yolodrew,
Unfortunately this is not a grid element. This is actually a Windows Listview control. If you need a grid type of control take a look at vdsobj.dll

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Tue Mar 10, 2009 11:46 am    Post subject: Reply with quote

yolodrew,

Remove the style from the table add line.

EDIT, hmm scratch that. Your code works ok for me, with or without a style.

Code:
  DIALOG CREATE,New Dialog,-1,0,804,580
  DIALOG ADD,STYLE,STYLE1,,,U,,
  DIALOG ADD,TABLE,LIST1,160,26,753,393,Tractlot[75]|Owner[170]|Address[60]|Lotparcel[110]|Home Phone[87]|Work Phone[87]|Tenant[140],,CLICK,COLUMNSORT,STYLE1
  DIALOG SHOW
  LIST ADD,list1,TRACTLOT@tab()OWNERNAME@tab()ADDRESS@tab()LOTPARCEL@tab()HOMEPHONE@tab()WORKPHONE@tab()TENANT
  LIST ADD,list1,TRACTLOT-2@tab()OWNERNAME-2@tab()ADDRESS-2@tab()LOTPARCEL-2@tab()HOMEPHONE-2@tab()WORKPHONE-2@tab()TENANT-2
  LIST ADD,list1,TRACTLOT-3@tab()OWNERNAME-3@tab()ADDRESS-3@tab()LOTPARCEL-3@tab()HOMEPHONE-3@tab()WORKPHONE-3@tab()TENANT-3
  LIST ADD,list1,TRACTLOT-4@tab()OWNERNAME-4@tab()ADDRESS-4@tab()LOTPARCEL-4@tab()HOMEPHONE-4@tab()WORKPHONE-4@tab()TENANT-4
  LIST ADD,list1,TRACTLOT-5@tab()OWNERNAME-5@tab()ADDRESS-5@tab()LOTPARCEL-5@tab()HOMEPHONE-5@tab()WORKPHONE-5@tab()TENANT-5

:evloop
  wait event
  goto @event()

:list1click
  %%ITEM = @item(list1)
  if @not(@null(%%ITEM))
    info %%ITEM
  end
  goto evloop
 
:close
  stop

_________________
cheers

Dave
Back to top
View user's profile Send private message
yolodrew
Newbie


Joined: 09 Mar 2009
Posts: 5
Location: Tehachapi, CA

PostPosted: Tue Mar 10, 2009 3:27 pm    Post subject: thanks Reply with quote

Thank you for the replies, l will take a look at vdsobj.dll

Thanks,

Andrew
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Mar 10, 2009 5:48 pm    Post subject: Reply with quote

DaveŽ wrote:
yolodrew,

Remove the style from the table add line.



Dave,
This issue is not that yolodrew can grab the value being returned the issue is that the VDS Table does not let you click on a single cell in the table and return just that value.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Mar 10, 2009 10:24 pm    Post subject: Reply with quote

The issue sounds familiar. I found the solution from a demo from CodeScript, which you can find here:

http://www.vdsworld.com/download.php?id=341&sid=1f1deced1817b9e3df6706f73fad2d19

I have been using this solution many times and it still works great.

Regards
Back to top
View user's profile Send private message
yolodrew
Newbie


Joined: 09 Mar 2009
Posts: 5
Location: Tehachapi, CA

PostPosted: Wed Mar 11, 2009 1:39 am    Post subject: Thank again! Reply with quote

Claz, thank you, I particularly like the full row select!

Adnrew
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group