데이터를 JSON 형식으로 수신하는 Handsontable 0.11.2 구현이 있습니다. 정렬 가능한 열을 만들었고 하나의 숫자 열 (숫자로 정의)을 가지고 문자열과 같은 정렬을 계속합니다. 나는 그것을 .0을 최종 서식에 추가하여 부동을 만들려고 시도했다. 0을 보여 주었지만 여전히 문자열로 정렬한다. Google 검색을 수행하는 몇 가지 잠재적 인 솔루션을 보았지만 제대로 작동하는 솔루션을 찾지 못했습니다. 내 handontable 설정은 아래에, 어떤 조언을 많이 주시면 감사하겠습니다.Handsontable 문자열과 같은 정수 정렬
$(document).on('click','.report',function(event) {
$.ajax({
type: "GET",
url: 'pending.php',
dataType: "json",
success: function(json) {
$('.item').remove();
$(".welcome").hide();
$(".carousel-inner").append("<div id='faTable'></div>");
var $container = $("#faTable");
var $parent = $container.parent();
$container.handsontable({
data: json.data,
startRows: 10,
startCols: 8,
rowHeaders: true,
manualColumnResize: true,
manualColumnMove: true,
columnSorting: true,
colHeaders: ['Lot','Number','Reason','Results','Billback','Status','Rank'],
contextMenu: true,
colWidths: [80,150,300,200,200,50,50],
columns: [
{data: "lot", type: 'text',readOnly: true},
{data: "number",type: 'text',readOnly: true},
{data: "reason", type: 'text',readOnly: true},
{data: "results", type: 'text',readOnly: true},
{data: "billback", type: 'text',readOnly: true},
{data: "status", type: 'text',readOnly: true},
{data: "rank", type: 'numeric',readOnly: true}
]
});
},
error: function(data) {
}
});
})