Datagrids - getting line data from items checked
Posted: Thu Dec 20, 2012 11:53 pm
I know how to do this the awkward, lengthy way - but I am hoping there is a sleek way:
I want people to be able to check names on a datagrid and then click a button and have the button get the names that were checked and send them to me (in an http tag).
The lengthy way is for each time something is checked, it sends an http tag to update a remote database. But if there is a list of 15 people, that's http messages, which is rather stupid.
Instead, I would like to send one list in one http message
I can't use hilited line - because it's multiple lines... So I need some kind of loop that gets the dgline information, sees if the checked button is hilited, and if so, gives me the name.
So for the first part, if they check the checkbox, I have
if pmousebtnnum is 1 then
if the short name of the target is "check" then
setdataofline the dgline of me, "checked", the hilite of the target
end if
end if
I'm not sure how to loop through the datagrid to get the name
Thanks
I want people to be able to check names on a datagrid and then click a button and have the button get the names that were checked and send them to me (in an http tag).
The lengthy way is for each time something is checked, it sends an http tag to update a remote database. But if there is a list of 15 people, that's http messages, which is rather stupid.
Instead, I would like to send one list in one http message
I can't use hilited line - because it's multiple lines... So I need some kind of loop that gets the dgline information, sees if the checked button is hilited, and if so, gives me the name.
So for the first part, if they check the checkbox, I have
if pmousebtnnum is 1 then
if the short name of the target is "check" then
setdataofline the dgline of me, "checked", the hilite of the target
end if
end if
I'm not sure how to loop through the datagrid to get the name
Thanks