Dear Mr Abu,
I want to hide the column value for example column (job_id), but i want to pass that value through the html link
like this $col["link"] = "emp_app_form/print_pdf_job_mail.php?id={job_id}";
$col["linkoptions"] = "target='_blank'";
if i hide this column(job_id) it not showing the proper id through the link
like this emp_app_form/print_pdf_job_mail.php?id=100";
Thank you,
You can use alternate of link, that allow html tags.
$col["default"] = "<a href='emp_app_form/print_pdf_job_mail.php?id={job_id}' target='_blank'>Job Link</a>";
It will now show link as Job Link with your required url.
Dear Mr Abu,
I can't use above option,bcz i need to access the link through the name using job_id
$col = array();
$col["title"] = "Name";
$col["name"] = "name";
$col["dbname"] = "LOWER(name)";
$col["width"] = "100";
$col["editable"] = false; // this column is not editable
$col["link"] = "emp_app_form/print_pdf_job_mail.php?id=job_id";
$col["linkoptions"] = "target='_blank'"; // extra params with <a> tag
$col["align"] = "left";
$cols[] = $col;
Replace Job Link with {name}
$col["default"] = "<a href='emp_app_form/print_pdf_job_mail.php?id={job_id}' target='_blank'>{name}</a>";
Dear Mr Abu,
Sorry not working.I replaced your code instead of $col[link].It showing like a normal data not the linked data.I'm not able post the screenshot here.
$col = array();
$col["title"] = "Name";
$col["name"] = "name";
$col["dbname"] = "LOWER(name)";
$col["width"] = "100";
$col["editable"] = false; // this column is not editable
$col["default"] = "<a href='emp_app_form/print_pdf_job_mail.php?id=job_id' target='_blank'>{name}</a>";
$col["align"] = "left";
$cols[] = $col;
Thank you,
Looks like you are using free version.
It is only supported in licensed version now.
As alternate, you can replace "default" property with formatter:
$col["formatter"] = "function(cellvalue, options, rowObject){ return '<a target="_blank" href="emp_app_form/print_pdf_job_mail.php?id='+rowObject.job_id+'">'+rowObject.name+'</a>'; }";