free jqgrid - custiom action, change row color after click« Wróć do listy pytań

example
Wysłane przez mrmucha
Zadane przez 29/06/2018 14:20
0

1. js code

1
2
3
4
5
6
7
action: "my_custom_action", position: "first", onClick: function (options) {
    var $userId = $('#jqGrid').jqGrid('getCell', options.rowid, 'id');
    $.get("user/my_action/" + $userId, function (data)
    {
        $("#jqGrid").jqGrid('setRowData',options.rowid, false, "my_class" );
    });
}
action: "my_custom_action", position: "first", onClick: function (options) {
	var $userId = $('#jqGrid').jqGrid('getCell', options.rowid, 'id');
	$.get("user/my_action/" + $userId, function (data)
	{
		$("#jqGrid").jqGrid('setRowData',options.rowid, false, "my_class" );
	});
}

2. css

1
2
3
.my_class, .wyslany_email > th, .my_class> td, .my_class{
    background-color: #99ff00;
}
.my_class, .wyslany_email > th, .my_class> td, .my_class{
	background-color: #99ff00;
}
Wysłane przez mrmucha
Odpowiedziane 29/06/2018 14:25