Conditional formatting stops with # in data?

QuestionsConditional formatting stops with # in data?
Glenn asked 9 years ago

Hi Abu,

Formatting of columns and rows works perfectly unless there is a # sign in the data.
eg 126 Franklin St. #55
If the # is in the main grid no formatting happens for any column. If it is in the detail grid then just the field with the # in it does not format.

Thanks

$agrid_options["loadComplete"] = "function addr_load()
{
var grid = $('#list_addr');
var rowids = grid.getDataIDs();
for (var i = 0; i < rowids.length; i++)
{
var rowid = rowids[i];
var data = grid.getRowData(rowid);
if((data.city == data.m_city) && (data.city != '')){
jQuery('#list_addr tr.jqgrow:eq('+i+')').css('background-image','inherit');
jQuery('#list_addr tr.jqgrow:eq('+i+') td[aria-describedby=list_addr_city]').css('background','inherit').css({'background-color':'silver', 'color':'black'});
}

if((data.street == data.m_street) && (data.street != '')){
jQuery('#list_addr tr.jqgrow:eq('+i+')').css('background-image','inherit');
jQuery('#list_addr tr.jqgrow:eq('+i+') td[aria-describedby=list_addr_street]').css('background','inherit').css({'background-color':'silver', 'color':'black'}); //red
}

1 Answers
Abu Ghufran answered 9 years ago

I tested it with # data and working fine.
Perhaps, non-formatting may be due to some other issue in code logic.

If you can email complete grid code and db sql, i can then test the scenario.

Your Answer

11 + 13 =

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?