我使用phpgrid.com数据网格并显示数据库中的表格。
$dg = new C_DataGrid("SELECT CONCAT(issues.type,'0',issues.kbid) As kbid, issues.issuesummary, issues.productid, organizations.orgname, issues.priority, issues.createddate, issues.lastupdated, issues.status, issues.resolution, issues.assigneduserid FROM issues INNER JOIN organizations ON issues.creatingorg=organizations.orgid", "kbid", "IssueBase");
$dg -> enable_search(true);
$dg -> set_col_edittype('status', 'select', 'OP:Open;CL:Closed;DF:Deferred;VE:Vendor;FQ:FAQ');
$dg -> set_col_edittype('priority', 'select', '0:None;1:Urgent;2:High;3:Medium;4:Low;5:Lowest');
$dg -> set_col_edittype('productid', 'select', $dd3);
$dg -> set_col_edittype('resolution', 'select', 'PR:Pending Review;FX:Fixed;UR:Unreproducable;AD:As Designed;UF:Unable to Fix;WD:Withdrawn;NI:Need More Info;AS:Assigned;WK:Working on Issue;TS:Testing Issue;RJ:Rejected;UF:Temporary Fix;AC:Accepted');
$dg -> set_col_edittype('assigneduserid', 'select', $y);
$dg -> set_col_edittype('orgname', 'select', $org);
$dg->enable_export('EXCEL');
$dg->display();
但是在导出中它仍然显示数据库值。怎么做?
答案 0 :(得分:2)
您使用“select”类型set_col_edittype吗?如果是这样,它应该在export中显示别名值。
$dg -> set_col_edittype("Dept", "select", "20:CSE;30:IT", false);