tomagruppa
Posts: 2
|
Posted: 04/02/2004, 4:59 AM |
|
I have an editable grid with two labels and a checkbox (not the standard delete checkbox since delete is not allowed). The labes are bound to columns in the database the checkbox is not. How can I determine the value of the labels associated with the checkbox (same row) when it is clicked?
I am coding in ASP and javascript.
|
|
|
peterr
Posts: 5971
|
Posted: 04/02/2004, 12:30 PM |
|
It is not possible to determine the values of the labels since they are just plain text shown on the page and they are not being submitted via form. When I need to submit or determine the values of the labels then I usually add Hidden fields with the same values as the labels (bind them to the same db columns as labels).
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
tagruppa
|
Posted: 04/02/2004, 6:09 PM |
|
Peterr:
Thanks for the quick reply. I apologize for what must seem like a simple question to you but I am just learning this system and to some extent the client-side programming.
I did not explain my problem clearly. What I am trying to do is very similar to the delete function supported by the editable grid. I want to display some columns of information (could be text boxes - does not have to be labels) in each row along with a check box. When the check box is clicked I want to then change a value in the DB that is associated with that information. A simple example would be to display a person's name and a check box for availability. Depending on the checkbox state a corresponding row in the DB would be updated. For reasons to complex to explain here, I cannot use T/F, or Y/N for the DB item - otherwise this would be very simple. If there is a way to use a hidden control on each row that could be updated when the checkbox in that row is clicked I would love to know how to do it. I have literally spent hours on this and cannot seem to determine anything about what happened except that a checkbox somewhere in the grid was checked.
I was hoping there was some way to understand in JS which row in the grid included the checkbox that was just clicked and that I could then "read" the other controls in that row. It seems that the delete function in the grid must operate in that fashion.
Thanks . . . tom
|
|
|
|