use of fnGetSelectedData method

use of fnGetSelectedData method

matthewjmatthewj Posts: 39Questions: 2Answers: 0
edited June 2013 in General
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]

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Fantastic - thanks for posting your solution!

    Regards,
    Allan
This discussion has been closed.