Internal Link

QuestionsInternal Link
David Mills asked 11 years ago

Hi
I have a quick question.
When I mane a column like so …
$col = array();
$col["title"] = "More";
$col["name"] = "StudentId";
$col["default"] = "View More"; // default link text
$col["width"] = "8";
$col["editable"] = false; // this column is editable
$col["align"] = "center"; // this column is editable
$col["search"] = false; // this column is searchable
$col["resizable"] = true;
$col["hidden"] = false;
$col["linkoptions"] = "target='_self'"; // extra params with <a> tag
$col["link"] = "student_form.php?ID={StudentId}"; // link e.g. http://domain.com?id={id} given that, there is a column with $col["name"] = "id" exist
$cols[] = $col;

… the action column icons will not work. When I remove the column, every thing works perfect.

The question is about $col["link"], do I need the "http://domain.com/localhost/student_form.php?id={id} ?

The reasion I ask is that right now I'm working off line. When I put the grid online, do I have to edit this line?

4 Answers
Abu Ghufran answered 11 years ago

This should work without domain too. However you can try this alt.

You can remove link and linkoption property and put anchor in 'default' property.

$col["default"] = "<a href='student_form.php?ID={StudentId}' target='_blank'>View More</a>";

David Mills answered 11 years ago

I think I found an issue
When I try to use the $col["default"] = "Anything", the grid will not let me edit then save. Even the icons will (in the Actions column) will not change.
When I comment the $col["default"] = "anythig", the grid works normal.

Please test

David Mills answered 11 years ago

Never mind'

I this it is my fault.

David Mills answered 11 years ago

FYI

I got it!

The column can't be used.
erg.
col["default"] = "<a href='student_form.php?ID={StudentId}' target='_blank'>View More</a>";

(StudentId) was already use in the grid. Since gender was not used, I can use it.

So remember people, the column name cannot be used in the grid.
(It didn't work for me anyway)

Your Answer

2 + 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?