Error with set_conditional_css, replace of null

QuestionsError with set_conditional_css, replace of null
Juan Pedro asked 4 years ago

Hi Abu,

I have one grid some complex, with some select2, css, etc. In first time onload all is correct, but  when I order, filter etc. it hangs on m.

I think it loads the data, it puts loading and the rows are left unformatted and I don’t see the information, but if I edit, the data is there (invisible).

The error that I get in the console is the following:

228 Uncaught TypeError: Cannot read property ‘replace’ of null

the error code is in follow underlined:

 

{if(jQuery(‘#div_no_record_list1’).length==0)

jQuery(‘#gbox_list1 .ui-jqgrid-bdiv’).not(‘.frozen-bdiv’).append(‘<div id=”div_no_record_list1″ align=”center” style=”padding:30px 0;”>’+jQuery.jgrid.defaults.emptyrecords+'</div>’);else

jQuery(‘#div_no_record_list1’).show();}

else

{jQuery(‘#div_no_record_list1′).hide();}if(ids&&ids.rows)jQuery.each(ids.rows,function(i){if(typeof(this.PrimerArbitro_EstadoNominacion)==’undefined’)return;if(!jQuery.isNumeric(this.PrimerArbitro_EstadoNominacion))

this.PrimerArbitro_EstadoNominacion=this.PrimerArbitro_EstadoNominacion.replace(/(<([^>]+)>)/ig,”);if(this.PrimerArbitro_EstadoNominacion.toString().toLowerCase()==’PR’.toString().toLowerCase())

If delete code for set_conditional_cs then its ok..

part of code is

$f = array();
$f[“column”] = “PrimerArbitro_EstadoNominacion”; $f[“op”] = “eq”; $f[“value”] = “PR”; $f[“cellcss”] = “‘background-color’:’yellow'”;
$f_conditions[] = $f;

$f = array();
$f[“column”] = “PrimerArbitro_EstadoNominacion”; $f[“op”] = “eq”; $f[“value”] = “PC”; $f[“cellcss”] = “‘background-color’:’orange'”;
$f_conditions[] = $f;

$f = array();
$f[“column”] = “PrimerArbitro_EstadoNominacion”; $f[“op”] = “eq”; $f[“value”] = “R”; $f[“cellcss”] = “‘background-color’:’red'”;
$f_conditions[] = $f;

$g->set_conditional_css($f_conditions);

Is the problem with null value?

Is possible add code in $f= array to fix formatting when null.

Thank you.

 

1 Answers
Abu Ghufran Staff answered 4 years ago

Hi,

I’ve emailed you an update, please recheck after updating.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

20 + 11 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?