Sigma Php Ajax framework, Ajax Components, GUI Builder
February 12, 2012, 12:55:02 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Bug: returning false on beforeSelectRow does not cancel row selection  (Read 1437 times)
erik
Newbie
*
Posts: 1


View Profile
« on: May 05, 2009, 03:27:02 PM »

I tried this in the 2.2 events demo, but I have the same problem.

Per the beforeSelectRow API documentation:
returns: Boolean. Return false to prevent row from being selected.

Here's my function:
   beforeSelectRow : function(record ,row, rowNo,grid) {
            return false;
        }

But after clicking a row, the row is still selected - what I want to do is PREVENT the row from being selected if the data in the details grid has not been saved.

This does not appear to function per the API documentation.

Workaround:

If anyone else is having this issue, you can hack around this by returning an undefined variable, ie:

beforeSelectRow : function(record ,row, rowNo,grid) {
    return PLZ_DONT_SWITCH_ROWS_MAYBE_IF_I_THROW_AN_UNDEFINED_VAR_AT_YOU_YOU_WILL_STOP_IT;
}

This halts script execution, but it's exactly what I was needing.

Plz let me know if this is working correctly & I'm at fault.

Thanks,

-Erik
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!