Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 jsp 页面上使用 DHTMLX 网格。从服务器端我正在加载一些数据。一旦将数据加载到网格上,我希望数据以排序方式进行。我发现有一种方法 "grid.sortRows(col, type, order);",但它仅在您单击任何标题时才有效,我希望默认情况下数据将以排序方式出现。
"grid.sortRows(col, type, order);"
mygrid.load(YOUR_URL, function() { // we are in callback mygrid.sortRows(0, "str", "des"); // sorts grid mygrid.setSortImgState(true, 0, "des"); // sets icon to sort arrow });