use of fnGetSelectedData method
use of fnGetSelectedData method
Recently I wanted to select a data row and click on a tabletool plugin button which had to take me to a page based on the selected row's id. I achieved this with the help of Allan. Excellent support. Thank you! I am posting this here in case anyone needed help. This was achieved using fnGetSelectedData method.
[code]
{
"sExtends": "text",
"sButtonText": "My details",
"fnClick": function (nButton, oConfig) {
var sData = this.fnGetSelectedData(oConfig);
if(sData.length == 1) {
var rowId = sData[0].rowId
var href = "${pageContext.request.contextPath}/admin/my_home.jsp?rowId=" + rowId;
$('#ui-tabs-2').load(href);
return false;
}
}
}
[/code]
[code]
{
"sExtends": "text",
"sButtonText": "My details",
"fnClick": function (nButton, oConfig) {
var sData = this.fnGetSelectedData(oConfig);
if(sData.length == 1) {
var rowId = sData[0].rowId
var href = "${pageContext.request.contextPath}/admin/my_home.jsp?rowId=" + rowId;
$('#ui-tabs-2').load(href);
return false;
}
}
}
[/code]
This discussion has been closed.
Replies
Regards,
Allan