Hide button in grid

QuestionsHide button in grid
Abdul asked 10 years ago

How do I display a button in the grid based on some condition. Say for exampla, I want to display attachment button if there is any attachement exist with the row

1 Answers
Abu Ghufran answered 10 years ago

You can have callback function, that will allow you to display based on row data. For e.g. with that column settings …

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

function display_attach($data)
{
// check column name path_url and show link if not empty.

$p= $data["path_url"];

if (empty($p)) return "None";
else return "<a href='$p'>Download</a>";
}

Your Answer

8 + 20 =

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?