Checkbox IDs are not recognized after ninety rows

Checkbox IDs are not recognized after ninety rows

jtaylormejtaylorme Posts: 9Questions: 2Answers: 0

First time here and not sure when i am supposed to "Ask a Question" or start a "New Discussion" so sorry if wrong spot.

I have a grid that works fine except for one weird thing...I define a column for checkbox in the following fashion and it works as expected. I have a button which tells it to remove any checked items and this works except when the number of rows exceed 90. Below I have the code for looping through the grid and use the ID to see if a box is checked ( a little extra stuff right now for debugging). If I am at the top of the page it will find the ID for 90 rows and on the 90th it will fail consistently saying the ID is NULL. If I reorder it still fails at 90 so sure it is not an item issue. It will still loop through the rest of the records and see the grid data so that part is good. If I scroll to the bottom of the grid and start the removal it will not see any IDs until it gets to the last 90 records. If I move to the middle it will only see the middle 90 records. If I "Inspect Element" in the browser it only shows the 90 records so the Javascript is reporting correctly. Is this expected behavior? Can't find any report of such a problem in all my searching, here or on Google. Wasn't sure if this was posted publicly so didn't want to post a link as it will require login credentials. Happy to send info directly but thought I would start with this in case it is expected behavior and is something that everyone is born knowing except me, hence no posts anywhere that I could find.

Suggestions for accessing the entire page of data?

Thank you.

Jim

         "columns": [
                     {
                       "data"           : null,
                       "width"          : 10,
                        render          : function (data, type, row, meta) {
                                                                             if ( type === 'display' ) {
                                                                                id = data.rec_num;
                                                                                return '<input type="checkbox" id="pcb'+id+'"   class="editor-smartObject" >';
                                                                             } // END IF
                                                                             return data;
                                           },
                        className       : "dt-body-center"
                     }, 

######################################################


  table.rows({search:'applied'}).every( function ( rowIdx, tableLoop, rowLoop ) {
          var d = this.data()
          var rec_num = d.rec_num;
          row_el = 'pcb'+rec_num;    
    //    alert("new"); 
          if (cntr % 50 == 0) {
             table.row( rowIdx ).scrollTo();
          };  // END IF MOD 
          
//        alert(cntr+'\n\n'+row_el+'\n\n'+d.title);
          if (document.getElementById(row_el) == null) {
         //  if (cntr > 110) {   alert(cntr+'\n----------------------------------------\n'+row_el+'\n\n'+d.title); };
          }
          else
          {
          if (document.getElementById(row_el).checked === true) {
                                                                  rec_num_list = rec_num_list+'-'+rec_num;   
                                                                  row_list[cnt] = rowIdx;
                                                                  cnt++;                        
                                                                }; //END IF                                                 
         };  // END IF/ELSE NULL
        
        cntr++;
                                 
    });  //END EVERY ROW
    table.row( 0 ).scrollTo();

Answers

This discussion has been closed.