Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Problem using Form Edit
02/12/2008
14:51
Avatar
a222493
Member
Members
Forum Posts: 3
Member Since:
21/11/2008
sp_UserOfflineSmall Offline

HI,

I'm having trouble Form Editing.  I use the "navGrid" which pops up a form for the row that I selected.  I press submit and the server saves the data and posts back a good response.  Then I click the "X" to close the form.

However, now the grid is behaving strange.  When I click on another row, it is highlighted but the first row stays highlighted as well.  It looks like the grid changes to multi select...

1) Does anyone know why this happens?
2) What are the fields in the return array?  (what does [false, "Message", ""] mean?

Here is my function that is fired after the "afterSubmit" event:

     function checksave(serverStatus, aPostData)
     {
        var jsonText = serverStatus.responseText;
        var mydata = eval('(' + jsonText + ')');

        if (mydata.status == "False")
        {
            return [false, mydata.status, ""];
        }
        else
        {
            return [true, "", ""];
        }
    }

04/12/2008
12:31
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

1) One possible reason is that you do not have uniquie id for the

rows. If we have rows which id's equal the grid selection will not work

correctly.

2) It is goo to see docs. 

what does [false, "Message", ""] mean?

The first parameter indicates if the operation is successful

true - success, false - no success.

if the operation is not successfull then the message - "Message" will appear

to the user to indicates the type of error.

The third parameter is only valid if used when inserting new row.

If this parameter is empty the new row ID  becomes:

1) if the parameter reloadAfterSubmit : true - the new value from server

2) reloadAfterSubmit :false  - the number of records + 1

If this parameter is not empty - the row ID is set with this value.

Typical you should return this from server when the data is submited 

(inserted) -

i.e. the server return the new ID which can be set in the grid.

Hope this help

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
67 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information