0

我使用 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();

但在导出时它仍然显示数据库值。这个怎么做?

4

1 回答 1

2

您是否使用“选择”类型 set_col_edittype?如果是这样,它应该在导出中显示别名值。

$dg -> set_col_edittype("Dept", "select", "20:CSE;30:IT", false);

参考: http: //phpgrid.com/documentation/set_col_edittype/

于 2015-03-04T10:30:26.033 回答