Reference example: The & quot; showRowDetail & quot; method of the detailed row table can add a detailed row to a normal table row. After obtaining the DOM element of the detailed row through the & quot; getRowDetailCellEl & quot; method, you can add any HTML content to the DOM element of the detailed row. FunctiononShowRowDeta...
Reference example: detailed line
The "showRowDetail" method of a table can add a detailed row to a normal table row.
After obtaining the DOM element of the detailed row through the "getRowDetailCellEl" method, you can add any HTML content to the DOM element of the detailed row.
Function onShowRowDetail (e ){
Var grid = e. sender;
Var row = e. record;
Var td = grid. getRowDetailCellEl (row );
$. Ajax ({
Url: "../data/DataService. aspx? Method = GetEmployee & id = "+ row. id,
Success: function (text ){
Var o = mini. decode (text );
// Generate detailed information html
If (o. gender = 1) o. gender_name = "male ";
Else if (o. gender = 2) o. gender_name = "female ";
Else o. gender_name = "";
O. birtyday_name = o. birthday? Mini. formatDate (o. birthday, "yyyy-MM-dd "):"";
Td. innerHTML = "";
$ ("# FormTemplate"). tmpl (o). appendTo (td );;
}
});