$col["default"] Difficulties

Questions$col["default"] Difficulties
Mark M asked 3 years ago

I wanted to create a column containing a hyperlink based on the row ID. I used the following code which works fine,

$col = array();
$col["title"] = "Action";
$col["name"] = "id";
$col["link"] = "clientreg.php?id={id}";
$col["linkoptions"] = "target='_self'";
$col["width"] = 25;
$col["editable"] = false;
$col["search"] = false;
$cols[] = $col;

This displays the ID value as a hyperlink, but I actually want to display some static text as a hyperlink such as "Edit Client"
I added the following to the col list :-

$col["default"] = "Edit Client";

however the column still just shows the ID as a hyperlink.

I'm stuck on why

Many thanks

6 Answers
Abu Ghufran answered 3 years ago

The 'default' option for html code in cells is supported in full version.

Mark answered 3 years ago

Apologies Abu

I just read this limitation in another support ticket.

I'm currently testing phpgrid for implementation in a client project, if it does what I need I'll be getting the appropriate license.

and so far so good! 🙂

Abu Ghufran answered 3 years ago

I just emailed you build for evaluation.
Replace it in lib/inc folder.

Mark answered 3 years ago

One final question,

Is the 'ondblClickRow' event also disabled in the free version ?
Before using the hyperlink method to link to a page I tried adding some doubleclick JS as described here :-


but when the row was double clicked the script didn't fire.

Abu Ghufran answered 3 years ago

Please try on full version build that i sent.
It should work.

Mark answered 3 years ago

Many thanks for that

Both methods are all working fine 🙂

Your Answer

7 + 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 / 5. Vote count:

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

Let us improve this post!