jQuery中的easyui

來源:互聯網
上載者:User

標籤:結束   type   inf   顯示行號   params   remote   phone   idt   res   

 

一,easyui---datagrid綁定資料的簡單測試:

1.資料庫中的UserInfo表及資料測試:

2.DAL層:

//分頁,模糊查詢(pageNum-1)*pageSize+1----從第幾條資料開始,pageNum*pageSize----查詢到那一條結束

//查詢總的條數

 

3.一般處理常式(UserInfoHander.ashx):

 4.datagrid綁定資料:

<script type="text/javascript">
$(function () {
loadUser();
$("#datagrid").datagrid({
url: "UserInfoHander.ashx",//請求一般處理常式
type: "post",
title: "使用者資訊表",
remoteSort: false,//預設為true 如果對本機資料排序必須設定為false
height: 500,//設定表格的高度
pageSize: 5,//每頁顯示的資料
pageList: [1, 2, 3, 4, 5, 6],
pagination: true,//是否開啟分頁
rownumbers: true,//是否顯示行號
singleSelect: true,//是否只能單行選中
queryParams: getQueryParams(),//返回參數
columns: [[
{ field: "ck", checkbox: true },
{ field: "id", title: "編號", width: 100, sortable: true },//sortable: true 指定欄位進行資料排序
{ field: "name", title: "使用者名稱", width: 150 },
{ field: "phone", title: "電話", width: 150 },
{ field: "address", title: "地址", width: 300 }

//此處的id,name,phone,address欄位與實體類中提供get,set屬性一 一 對 應 

]],

<script />

5.:

jQuery中的easyui

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.