我的 jQuery Datatable
有以下代码,其中最后一列有一个按钮。当用户点击它时,我需要获取所有列单元格值,以便我可以将它们传递到模式中进行编辑。
"fnDrawCallback": function (oSettings) {
hideWaiting();
// button to Edit the person
$('[data-id="btnedit"]').on('click', function (e) {
var me = $(this);
e.preventDefault();
var personId = $(this).attr('data-personid');
//*** HERE I WANT TO GET ALL ROW CELLS VALUES ***//
$this.showEditModal();
});
},
"aoColumns": [
{ "sName": "Description", "bSortable": true },
{ "sName": "Name", "bSortable": true },
{ "sName": "Position", "bSortable": false },
{ "sName": "ContentUrl", "bSortable": false },
{ "sName": "HolidayType", "bSortable": false },
{ "sName": "LeaveType", "bSortable": false },
{
"mData": null,
"bSortable": false,
"sWidth": "80px",
"sClass": "dt-body-center",
"mRender": function (data, type, row) {
var res = "";
res = '<a href="#" data-id="btnedit" data-personid="' + row[6] + '" data-toggle="tooltip" data-placement="top" title="" class="btn btn-primary"><i class="fa fa-pencil"></i></a>';
return res;
}
},
答案 0 :(得分:0)
可能是这样的
version: 1.0.6+13
analyzer:
enable-experiment:
- non-nullable
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
flutter_bloc: ^6.1.1
bloc_provider: ^0.7.0+3
provider: ^4.3.2+3
shared_preferences: ^0.5.12+4
package_info: ^2.0.0
#firebase
firebase_core: ^1.1.0
firebase_analytics: ^8.0.2
firebase: ^9.0.1
firebase_crashlytics: ^2.0.2
dependency_overrides:
firebase_core_platform_interface: ^4.0.0
plugin_platform_interface: ^2.0.0
http: ^0.13.0
http_parser: ^4.0.0
shared_preferences: ^2.0.5
path_provider_windows: ^2.0.0
path_provider_platform_interface: ^2.0.0
path_provider_linux: ^2.0.0
dev_dependencies:
flutter_test:
sdk: flutter