Page 1 of 1

DataGrid

PostPosted: Thu Nov 18, 2010 9:28 am
by digital1
I have installed DataGrid following these instructions as noted here: http://xataface.com/wiki/DataGrid

I am able to get the grid to show up for my tables successfully, but whenever I try to edit a record, it just stays red and does not update.


Here is the code in my permissions.ini file:
Code: Select all
[ADMIN]
    DataGrid:view_grid=1
    DataGrid:update=1



Here is the code in my Application Delegate:
Code: Select all
function getPermissions(&$record){
         $auth =& Dataface_AuthenticationTool::getInstance();
         $user =& $auth->getLoggedInUser();
         $role = $user->val('role');
       
        if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
             // if the user is null then nobody is logged in... no access.
             // This will force a login prompt.
             
          if ($user->val('role') == 'ADMIN' ){
        return Dataface_PermissionsTool::getRolePermissions('ADMIN'); }   
             
         else{
         return Dataface_PermissionsTool::getRolePermissions($role);
             // Returns all of the permissions for the user's current role.
             }
      }
     





Am I missing something here?

Re: DataGrid

PostPosted: Thu Nov 18, 2010 9:55 am
by shannah
check for javascript errors and errors in your server log.

Re: DataGrid

PostPosted: Thu Nov 18, 2010 9:57 am
by digital1
Thanks for the fast response Steve. Much appreciated. Upon closer inspection I noticed that the save was occurring, but when a record is saved, the red tick mark in the corner doesn't go away. Is there somewhere I can check for that? Any tips on how to rectify that? I am on the newest version 1.2.6 of Xataface btw.

Re: DataGrid

PostPosted: Thu Nov 18, 2010 2:16 pm
by digital1
Hey Steve,

I was able to get this handled. I was wondering if there was a way to increase the 5 second limit to something a little higher. I hunted around in the JS and didn't see anything apparent that jumped out at me. Maybe you have a suggestion (?) Thanks in advance!

Re: DataGrid

PostPosted: Thu Nov 18, 2010 2:28 pm
by shannah
See the setInterval call in this template:
http://weblite.ca/svn/dataface/modules/ ... /grid.html

Re: DataGrid

PostPosted: Mon Nov 22, 2010 10:05 am
by digital1
Thanks Steve! worked like a charm!