Striped blocks

QuestionsStriped blocks
Vygandas asked 3 years ago

If I have in one column data:

9000009003543630
9000009003543630
9000009003543630
9000009003543630
9000009003543630
9000009003543630
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543621
9000009003543621
9000009003543621
9000009003543621

Can I have color stripes in blocks ?
white:
9000009003543630
9000009003543630
9000009003543630
9000009003543630
9000009003543630
9000009003543630
grey:
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
9000009003543620
white again..
etc.

 

2 Answers
Abu Ghufran Staff answered 3 years ago

Hi,

I reviewed your case but currently it’s not supported.
Closest solution is conditional formatting which might not solve your case.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Vygandas answered 3 years ago

I did some code with php, it works nicely. Let’s say a required column is ‘barcode’
Just use extra php sql with added “GROUP BY barcode”.

Then generate array of conditional css:

$result = mysqli_query($con, $sql_.”GROUP BY paletes_op.barcode”) or die(mysqli_errno($con));

$odd_or_even = 1;

while($row = mysqli_fetch_array($result)) {

$paletes_op_barcode = $row[‘barcode’];

if ($odd_or_even % 2 == 0) {
$f = array();
$f[“column”] = “barcode”;
$f[“op”] = “=”;
$f[“value”] = $row[‘barcode’];
$f[“css”] = “‘background-color’:’#fcffa4′”;
$f_conditions[] = $f;
}

$odd_or_even++;

}

Your Answer

12 + 15 =

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?