paulW
Posts: 24
|
| Posted: 07/21/2009, 9:48 AM |
|
I have a standard editable grid that displays 100 rows, and only one column in the grid is actually editable.
When the form is submitted, i have code that will see which rows were changed, and send e-mails to the address associated with that row.
The problem is that I can't seem to capture the id of each rom in BeforeBuildUpdate, BeforeExecuteUpdate, or AfterExecuteUpdate.
I need this value as each row is updated in order to see which ones have changed.
so far the only 2 methods i have tried are
$gridName->controlName->GetValue()
and
$Container->controlName->GetValue()
if anyone has an idea i'd appreciate it.
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 07/22/2009, 11:17 AM |
|
I'm a little confused here.
Does your e-mail sending work as coded already??
What do you need the ID for??
Let me know
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
paulW
Posts: 24
|
| Posted: 07/22/2009, 11:27 AM |
|
The email code works fine. I need the ID because the email only gets sent if the one editable field in the Editable Grid gets changed to a specific value. When the Update is performed, it looks like it's updating all fields in all rows, no matter whether the values were changed or not. I need the ID so that before the Update is performed, I can check the value currently stored in the DB against the value that was selected when the update button was clicked. If the value was changed, then I need to check whether it was changed to the specific value that warrants an email.
I hope this helps.
|
 |
 |
damian
Posts: 838
|
| Posted: 07/22/2009, 3:51 PM |
|
search rownumber
http://forums.codecharge.com/posts.php?post_id=94680&s_keyword=rownumber
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
paulW
Posts: 24
|
| Posted: 07/23/2009, 1:27 PM |
|
So is there a way to get the pk from the row number? i guess I'm a little confused...
|
 |
 |
paulW
Posts: 24
|
| Posted: 07/23/2009, 2:17 PM |
|
Ok I'm an idiot...
Here's the only logical solution, in case anyone else has a blonde moment about this:
My editable grid has one column that is editable (listbox, but could also be a text field, etc) and the rest are labels
The reason I couldn't get the pk was because (duh!), since it's not editable, it doesn't get submitted with the rest of the form.
I put a hidden field in each row which also holds the pk, and made a custom update statement so the form wouldn't try to update the pk.
Thanks damian and jjrjr1 for putting up with my stupidity....
|
 |
 |
|