"Where" do I send a "mouseup" message on a datagrid form which has scrolled lines... i.e.:
send "mouseUp 1" to xxxx
I know it sounds like a ridiculously simple question (and likely is) but a datagrid form seems to create a "Row Template" group for each populated row... i.e. "Row Template 0001", "Row Template 0002"... etc. UNTIL it reaches a row which is outside of the visible rows.... it then starts to create "duplicate" templates. For example, if there are 6 populated rows and the DataGrid is sized to only show 3 rows at a time, upon the initialization of the Datagrid, the Row templates groups are named:
this is demonstrated by putting a "put me" in the Behavior Script within a MouseUp handler.
So... the "simple" issue is that if I "manufacture" the Row Template name based on the row to which I want to send the "mouseUp" command it works perfectly for the "visible" rows... even the next 2 rows (which I have scrolled into view via:
set the dgHilitedLines of group "DataGrid 1" to y
put the dgIndexOfLine[y] of group "DataGrid 1" into x
where "x" and "y" are throw-away variables ... which scrolls the appropriate row into view (for some reason)) ... if I try:
dispatch "ScrollLineIntoView" to group "DataGrid 1" with pLine"
... my row data doesn't populate properly ... which I may ask about another time.
BUT, for the 6th and subsequent lines I have to "wrap" the group names according to the pattern above. i.e. for the sixth line, I manufacture "Row Template 0001", etc.
Since this "wrap-point" changes based on the "amount" of the datagrid I "expose", this doesn't lend itself to a very nice supportable project.
No doubt I'm approaching this wrong but I'm trying to teach myself datagrids and it's a struggle for this old brain!
I realized belatedly that I didn't do a very good job (at all) of describing what one of the row's in my grid looks like... it may be relevant to a solution.
Each row has 1 checkbox, 3 fields and 2 buttons.
One of the buttons (the one I need assistance with), named "Query" calls a "tsnet" function to query a remote WiFi module (esp8266) to return the status of one of the IO pins on the wifi module. Works like a charm on ALL rows, scrolled or not... becuse (I reckon) the button is actually *IN* the grid, so there's no issue with the group name.. it is always "me".
I also want to "automate" the queries (there are 8 such wifi modules involved). So I have a button outside of the datagrid which selects each row of the populated datagrid and sends the "mouseUp 1" message to the datagrid (described in my previous message under this subject)
It is THAT loop which manufactures the Row Template group names. It is THAT loop which has to know (at this time) which line/row it needs to "wrap" the group name back to "...0001"