Sigma Php Ajax framework, Ajax Components, GUI Builder
May 21, 2012, 09:49:06 PM *
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: Using method getCell()...  (Read 1032 times)
cbd
Full Member
***
Posts: 30


View Profile
« on: June 11, 2010, 03:45:36 PM »

Hi, I've some troubles trying to use this method.
Well, I add a new record to the dataset (just one for testing) without saving to the backend and then
I try the following code:

...
beforeSave : function( requestParameter ) {
   var ret = true;
   requestParameter.insertedRecords.each( function(valor, indice ) {
       if( valor.personal_id == 0 ) {
           alert("Message.");
           var myTD = mygrid.getCell(indice, 'personal_id');    <-------- CRASH HERE
           mygrid.focusCell(myTD);
           ...

Note: I'm also using prototype framework, so I use method each() to iterate loops on arrays.

Indice is equal to row number in the dataset.
Well, I get an error in line marked above...
Question: Am I using the method in a right way or not?

Thanks

CBD
« Last Edit: June 11, 2010, 08:16:59 PM by cbd » Logged
cbd
Full Member
***
Posts: 30


View Profile
« Reply #1 on: June 14, 2010, 05:04:59 PM »

I discovered that it is not possible to do this on inserted records.
All I need to do is to get a focusCell on a certain field not matching the right value when the record or the records are sent to the bakend.
On updated records it's working perfectly.
It's a pity not to be able to work on inserted records for me because I need to check several values programmatically when the data is saved, and get the cell with the wrong value focused in case of exist one.

Anyone kwows some trick to do this job?

Thanks
« Last Edit: June 15, 2010, 09:19:08 AM by cbd » 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!