本文整理匯總了TypeScript中GridClient.GridClient.populateData方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript GridClient.populateData方法的具體用法?TypeScript GridClient.populateData怎麽用?TypeScript GridClient.populateData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GridClient.GridClient
的用法示例。
在下文中一共展示了GridClient.populateData方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: setTimeout
$('#apply').click(function () {
// find the element we will place any (grid) debug-comments in
var rowcount = $('.rowcount').val();
// sanity check
if (rowcount < 0 || rowcount > 50000) {
// something is wrong so reset it back to 1000 rows!
$('.rowcount').val("1000");
// reset the number of rows to 1000 and inform the user with a red-ish banner
rowcount = 1000;
$comment.text("please select a number of rows below 50000 (and over zero)");
$comment.css('background-color', "rgb(253, 175, 175)");
// start a 3 seconds wait then re-popuplate
setTimeout(function () {
$comment.css('background-color', "");
newGrid.populateData(rowcount);
}, 3000);
return;
}
// repopulate the data
newGrid.populateData(rowcount);
});
示例2:
$('#btnCreateGrid').click(function () {
// remove the create grid button
$('#btnCreateGrid').remove();
// enable the apply button
$("#apply").removeAttr("disabled");
// and tell it to create a grid inside the designated element
newGrid.createGrid($grid, $comment);
// find the element we will place any (grid) debug-comments in
var rowcount = $('.rowcount').val();
// repopulate the data
newGrid.populateData(rowcount);
});