Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 11:53 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: DataGrid
PostPosted: Thu May 11, 2006 3:39 pm 
Offline

Joined: Mon May 01, 2006 3:27 pm
Posts: 60
As you probably noticed from past threads I need a way to store Strings. My project is starting to take shape and I thought this would be a good time to check into DataGrid.



My projects is a light contoller which I would like to give the user the ability to create Scenes and store them. For refrence I would like to add a text reference so the user can Name a created scene for easy selecting.



The Object DataGrid looks like it might work.



Can each Cell of the datagrid be selected and eddited ? I have played with it a little and was abble to set the grid and display text.



How do I idetify which cell was clicked ? SelectedCell()



How do I retreive the current cells Text ?



Jerry


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 11, 2006 3:48 pm 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
Quote:
Can each Cell of the datagrid be selected and eddited?


Yes whenever a cell is selected the CellSelected event is called.





Quote:
How do I idetify which cell was clicked ?


Refer to the properties currow, and curcol.



Quote:
How do I retreive the current cells Text ?


Use the GetCellText function.



Code:

func CellSelected()

    Label_1.value = Datagrid_1.GetCellText(currow, curcol)

endfunc


_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 12, 2006 6:44 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Another tip with the DataGrid: If a user touches the already selected cell, the DblClick() event is fired instead of the CellSelected (as that cell is already selected).



Another trick that I sometimes use with the DataGird, is if I don't actually show a selection, in the CellSelected event, I set the curRow = -1, which effectively deselects any cells.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 12, 2006 8:52 am 
Offline

Joined: Mon May 01, 2006 3:27 pm
Posts: 60
Thanks I will give it a try tonight.



Jerry


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group