0
我正在使用內聯編輯事件。在點擊一個不可編輯的單元格時,我想打開Rich Text Box。我嘗試使用edittype:custom並返回rte,但沒有顯示。有沒有其他的方式來做到這一點。將RTE與JQGrid集成
請建議!
感謝, Arshya
我正在使用內聯編輯事件。在點擊一個不可編輯的單元格時,我想打開Rich Text Box。我嘗試使用edittype:custom並返回rte,但沒有顯示。有沒有其他的方式來做到這一點。將RTE與JQGrid集成
請建議!
感謝, Arshya
我能夠這樣使用下面的解決方案
在負載完成我加入了代碼,打開電池點擊
loadComplete: function() {
var iColNotesPresent = getColumnIndexByName($(this), 'NotesPresent'), rows = this.rows, i, c = rows.length;
var iColNotes = getColumnIndexByName($(this), 'Notes');
for (i = 1; i < c; i += 1) {
$(rows[i].cells[iColNotesPresent]).click(function(e) {
var offset = jQuery(e.target).offset();
var rteText = $(jQuery(e.target).parent()[0].cells[iColNotes])[0].outerText;
var rowId = jQuery(e.target).parent()[0].id;
OpenRTEBox(offset, rteText, rowId);
});
}
},
//Open the div containing RTE
function OpenRTEBox(offset, rteText, rowId) {
isColNotes = true;
currsel = rowId;
$('#rteDiv').css({ position: "absolute", top: offset.top, left: offset.left, "z-index": 20 });
$('#rteDiv').show();
frames['rte0'].document.body.innerHTML = rteText;
}
股利實現這裏是RTE
html代碼 <script language="javascript" type="text/javascript">
writeRichText("rte0", "rte0", 575, 200, true, false, "Notes");
</script>
</td>
</tr>
<tr>
<td align="right">
<input type="button" id="btnOK" onclick="addNotes();" value="OK"/>
</td>
<td align="left">
<input type="button" id="btnCancel" onclick="closeDiv();" value="Cancel"/>
</td>
</tr>
</table>
</div>
使用edittype: custom
沒有意義的不可編輯的列。使列可編輯,通過使用editable: true