Torben Søemod
|
| Posted: 09/04/2004, 11:18 PM |
|
Hi
How do you specify a rowerror editable grid with PHP ?
I get an error in example editablegrid autorow :
Notice: Undefined offset: 10 in C:\Programmer\Apache Group\Apache2\htdocs\CCamplePack\EditableGridAutoRows\EditableGridAutoRows_events.php on line 40
The line looks like this :
if ($departments->RowsErrors[$RowNumber]) {
In ASP they have an other field "rowmessage". Anyone got a clue ?
Best regards
Torben Søemod
|
|
|
 |
Damian
|
| Posted: 09/05/2004, 6:50 AM |
|
What is the "{" doing at the end of the line?
<Torben Søemod@forum.codecharge (Torben Søemod)> wrote in message
news:5413aafbeecd41@news.codecharge.com...
> Hi
>
> How do you specify a rowerror editable grid with PHP ?
>
> I get an error in example editablegrid autorow :
>
> Notice: Undefined offset: 10 in C:\Programmer\Apache
>
Group\Apache2\htdocs\CCamplePack\EditableGridAutoRows\EditableGridAutoRow
s_events.php
> on line 40
>
> The line looks like this :
> if ($departments->RowsErrors[$RowNumber]) {
>
> In ASP they have an other field "rowmessage". Anyone got a clue ?
>
> Best regards
>
> Torben Søemod
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Torben Søemod
|
| Posted: 09/05/2004, 10:56 AM |
|
The "{" is just part of that specific line - and ofcause there is a counter "}" in the next line.
The problem is the $departments->RowsErrors[$RowNumber]) - it dosn't like the RowsErrors
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 09/05/2004, 1:42 PM |
|
I don't use PHP too much but I believe that $RowNumber cannot be accessed via events.
I had to create my own row counter some time ago, which actually was better because I could fully control if I want to count updated, deleted or new/inserted rows. I just created a global variable and increased the counter in each After Update/Insert/Delete/ event.
As for error handling, please take a look at: http://docs.codecharge.com/studio/html/Components/RTPro...PHP/Errors.html
I believe that when processing errors you don't need to use $RowNumber at all, because the errors should be processed in OnValidate even of the form, which is exectued once for each row - thus you are always working with the current row values.
Our support may be able to answer more specific questions at http://support.codecharge.com.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Torben Søemod
|
| Posted: 09/05/2004, 3:31 PM |
|
Hello Peterr
Thanks for your reply - I have no problem working with "->Errors" etc.
My problem is to get the "->rowserrors" to work when creating a an editable grid - and since it aint documentet its a little bit tricky 
I found out the reason for the mentioned error ! It because thevalues wasn't set before testing it. If there only is values in the first 10 lines in an 50 array it will give an notice for each line above 10. To avoid this I used the (isset($departments->RowsErrors[$RowNumber])) command - the helped. Futher i found that Rowerrors was the an internat variabel in the php section.
Best regards
Torben Søemod
|
|
|
 |