Get line data when the user checks a checkbox (data grid)
Posted: Wed Jan 16, 2013 6:58 pm
I have a data grid with checkboxes in a column. When the user checks a checkbox i need to get the data of that line and put it into a var to use later (i need to add the price of all the selected attachments and put it into a field). When the user unchecks a checkbox i need to remove the data of that line from the var. This is the code that i have so far in the data grid's script:
(the 2 answers are to see what happens)
This code works correctly only for the first row in the data grid. If i check/uncheck another row it always answers "checked".
Also the dgDataOfLine, dgDataOfIndex, GetDataOfIndex and GetDataOfLine are empty so i don't have a way to get a lines data.
Could anyone please help me to do this?
Thanks,
Max
Code: Select all
on mouseUp pMouseBtnNum
if pMouseBtnNum is 1 then
if the short name of the target is "Check" then
if the hilite of button "Check" is true then
answer "checked"
else
answer "unchecked"
end if
end if
end if
end mouseUp
This code works correctly only for the first row in the data grid. If i check/uncheck another row it always answers "checked".
Also the dgDataOfLine, dgDataOfIndex, GetDataOfIndex and GetDataOfLine are empty so i don't have a way to get a lines data.
Could anyone please help me to do this?
Thanks,
Max