toggle data grid form view
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
toggle data grid form view
Hi,
Is it possible to code the data grid form so that it will toggle between many-row view and 1 row view by clicking on the row?
keram
Is it possible to code the data grid form so that it will toggle between many-row view and 1 row view by clicking on the row?
keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit
Re: toggle data grid form view
Hi keram,
yes
I see 2 possible solutions.
1. place another (exact duplicate) datagrid "datagrid2" on top of the datagrid with MANY rows "datagrid1".
Pseudocode in grp "datagrid1", the one with many rows:
Then put this script into the SINGLE row datagrid:
You get the picture
2. this would require much more scripting like temporarily storing the complete
dgdata of the datagrid, checking the current number of displayed row to determine
if we need to toggle from single to multi row etc...
In any case much more elaborate
Best
Klaus
yes

I see 2 possible solutions.
1. place another (exact duplicate) datagrid "datagrid2" on top of the datagrid with MANY rows "datagrid1".
Pseudocode in grp "datagrid1", the one with many rows:
Code: Select all
on mouseup
put the dgIndex of me into tIndex
## Prepare a new ARRAY with only ONE row in it to fill the other SINGLE row datagrid with this array
put the dgDataofInde[tIndex] of me into tArray[1]
lock screen
hide grp "datagrid1"
show grop "datagrid2"
set the dgdata of grp "datagrid2" to tArray
unlock screen
end mouseup
Code: Select all
on mouseup
lock screen
hide grp "datagrid2"
show grop "datagrid1"
unlock screen
end mouseup

2. this would require much more scripting like temporarily storing the complete
dgdata of the datagrid, checking the current number of displayed row to determine
if we need to toggle from single to multi row etc...
In any case much more elaborate

Best
Klaus
Re: toggle data grid form view
Hi Klaus,
Thanks for sharing these ideas.
I've asked this question to see if there are any other alternatives to the task I posted here:
http://ftp.runrev.com/forums/viewtopic.php?f=7&t=19339
However on your statement:
I was hoping that there would be some way to change the row height according to the type of view I would chose. If there would be a way to set the row height in expanded line view to be as high as the data grid box itself...
Simon answered on my thread above so I'll try to accomplish that.
keram
Thanks for sharing these ideas.
I've asked this question to see if there are any other alternatives to the task I posted here:
http://ftp.runrev.com/forums/viewtopic.php?f=7&t=19339
However on your statement:
I can only answer: I got some kind of idea but not all is clear. But since it would involve 2 data grids instead of just 1 it may be even more complex and complicated than what I'm trying to accomplish with just 1 grid and 1 card.Klaus wrote:You get the picture
I was hoping that there would be some way to change the row height according to the type of view I would chose. If there would be a way to set the row height in expanded line view to be as high as the data grid box itself...
Simon answered on my thread above so I'll try to accomplish that.
keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit
Re: toggle data grid form view
I remember a webinar from 2009 where it was demonstrated how to have a datagrid view with rows of (in this case, employee data) and a "disclosure arrow" button. When you clicked on the button, the row view expanded to display more detailed information about the employee, including photos and personal summary. I will try and find a source for it. I think I probably have a copy downloaded but it will be a big file and I'm not sure about where to host it at the moment, so hopefully there is a link to a source already in existence.
Re: toggle data grid form view
Hi keram,
and scripting one datagrid to do what you want, you will see
Best
Klaus
I don't think that my couple of lines will be more complicated than managingkeram wrote:...But since it would involve 2 data grids instead of just 1 it may be even more complex and complicated than what I'm trying to accomplish with just 1 grid and 1 card.
and scripting one datagrid to do what you want, you will see

Best
Klaus
Re: toggle data grid form view
Sorry, the toggle in the other post I was referring to is in the button "Check".
Easy to solve.
Simon
Easy to solve.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: toggle data grid form view
yea, I believe you.Simon wrote:Easy to solve.
keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit