Column

QuestionsColumn
Steven Quek asked 2 years ago

Hi,

 

I have a column is a product SKU, i need change the replace the SKU value with a product description and if there any image will show a image

 

How can i achieve ?

 

Best regards

2 Answers
Mike answered 2 years ago

I would check-out the Demos under Appearance and Image – is that what you’re looking to do?

If-not, there may be some other ideas. A few of the demos have icons/photos in them.

Live Demo

Thanks

 

Mike

Abu Ghufran Staff answered 1 year ago

You can use conditional data callback function. You can have row data in $data array and use conditions to show desired data in certain column.

https://www.gridphp.com/docs/column-options/#conditional-content

e.g.

$col["on_data_display"] = array("display_keyword","");

function display_keyword($data)
{
	$kw = $data["keyword_name"];
	$numKeywords = count(explode("\n",$pass));
	if ($numKeywords > 3)
			return $numKeywords." Keywords";
	else
	{
			$pass = str_replace("+"," ",$pass);
			return $pass;
	}
}

PS: Apologies for the late reply, Ticket somehow get delayed.

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

6 + 6 =

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?