Sigma Php Ajax framework, Ajax Components, GUI Builder
May 21, 2012, 08:22:35 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: On Load, I want to set checked some checkboxes based on data in record.  (Read 977 times)
OKL
Jr. Member
**
Posts: 14


View Profile
« on: July 28, 2010, 02:00:01 PM »

On Load, I want to set checked some checkboxes based on data in record.

This is the case when you created a special column like this:
{id: 'chk', isCheckColumn: true}
I need some of the boxes to be checked on initial load based on some value in the same record/row.
It's not only for the current page displayed, it has to be set for all that came in dataset.
As a final goal, I want to call: grid.checkedRows and have an object returned properly right after Load is completed(no paging is done).

Any suggestions?
Perfectly, would use some other event and set checked for all records.(may be by iterating through all checked values)

Thanks, OKL
Logged
OKL
Jr. Member
**
Posts: 14


View Profile
« Reply #1 on: August 03, 2010, 11:49:21 AM »

the answer is simple:
mygrid.checkedRows = {"3":true,"4":true,"5":true,"23":true,"26":true,"27":true};

after load event write the above mentioned code.
you can create your own object in the same format dynamically, based on incoming data.
Logged
fmc_alfredo
Jr. Member
**
Posts: 7


View Profile
« Reply #2 on: February 01, 2011, 05:50:11 AM »

fetch mygrid.checkedRows (only checked rows !!):


     for ( var row_id in mygrid.checkedRows)
      {
       alert("Riga: "+row_id+" "+mygrid.checkedRows[row_id]);
      }
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!