我有一個枚舉像這樣用Java編寫的:顯示枚舉描述jqGrid的,而不是枚舉
public enum Status
{
ACTIVE("Active"), IN_ACTIVE("InActive");
Status(String desc)
{
this.description = desc;
}
private String description;
public String getDescription()
{
return description;
}
public void setDescription(String desc)
{
this.description = desc;
}
}
此枚舉是在jqGrid的屬性。但它總是顯示enum,即ACTIVE或IN_ACTIVE。我想讓jqgrid顯示Active和InActive。 謝謝
你可以發佈定義jqGrid的JavaScript代碼嗎?你使用'formatter:'select''(見[這裏](http://www.trirand.com/jqgridwiki/doku.php?id=wiki:predefined_formatter#formatter_type_select))?你能提供服務器響應內部的狀態和狀態描述之間的映射嗎?如果您以返回服務器的JSON/XML數據爲例(只有一行數據就足夠了),這將會很有幫助。 – Oleg 2012-04-11 22:20:01