In Bootstrap Table , one field has anchor tag, so when clicked i can get the data-index of parent row. Now i want to get the plete row data using the data-index
$(document).on('click', '.delete_icon', function(event) {
var index = $(this).parent().parent().data('index');
//Get the plete row data by using the dataindex
// Row has three fields
});
I cannot use data-uniqueid to get the data since my unique id is String like #1:1, #1:2 etc
In Bootstrap Table , one field has anchor tag, so when clicked i can get the data-index of parent row. Now i want to get the plete row data using the data-index
$(document).on('click', '.delete_icon', function(event) {
var index = $(this).parent().parent().data('index');
//Get the plete row data by using the dataindex
// Row has three fields
});
I cannot use data-uniqueid to get the data since my unique id is String like #1:1, #1:2 etc
Share Improve this question asked Feb 15, 2016 at 14:22 mondamonda 3,91516 gold badges61 silver badges85 bronze badges 1- could you provide HTML markup? – johannesMatevosyan Commented Feb 15, 2016 at 14:38
1 Answer
Reset to default 3you can obtain the row, index and data of the table with a click.
window.actionEvents = {
'click .dele_icon': function (e, value, row, index) {
alert('You click remove icon, row: ' + JSON.stringify(row));
console.log(value, row, index);
}
};
http://jsfiddle/wenyi/e3nk137y/39/