Diễn đàn    Các Projects Dotnetnuke (DNN)    using DNN PagingControl

Thành viênTrả lời
amatuer_vn03


41  bài
19-5-2009 15:39:2
Xin hỏi có ai biết dùng DNN PagingControl trong thư viện của Dotnetnuke ko, xin chỉ giáo cách sử dụng để Apply vào các ListControls
thanks so much
 
aspnet

Lập trình không biên giới
608  bài
20-5-2009 1:9:41
Thằng dnn có 1 class thế này

DotNetNuke.UI.WebControls.PagingControl

Sử dụng để phân trang. Dùng thì thế này

ctlPagingControl.TotalRecords = TotalRecords
ctlPagingControl.PageSize = PageSize
ctlPagingControl.CurrentPage = PageIndex

Chi tiết thì anh em tự tìm hiểu. Code nó nằm trong thư mục /library/controls/pagingcontrol.vb

Control này không có giao diện. Đến lúc runtime nó sẽ thực hiện render các controls con. Trong đó gồm n link mỗi link 1 trang, có 4 link đặc biệt là next, prev, first, last.

xem đoạn này là hiểu
---
str.Append(GetFirstLink() + "   ")
str.Append(GetPreviousLink() + "   ")
Dim result As System.Text.StringBuilder = New System.Text.StringBuilder(1024)
PageNumbers.RenderControl(New HtmlTextWriter(New System.IO.StringWriter(result)))
str.Append(result.ToString())
str.Append(GetNextLink() + "   ")
str.Append(GetLastLink() + "   ")
cellDisplayLinks.Controls.Add(New LiteralControl(str.ToString))
tablePageNumbers.RenderControl(output)
---
Dễ làm ấy mà.
---
Coding for food
http://yenbai.awas.vn
http://tknd.vn
http://coder.awas.vn
http://awas.vn
http://bieuquyet.vn
http://webhocsinh.com
 
amatuer_vn03


41  bài
20-5-2009 10:35:4
OK, thanks a Khánh nhé. Em làm đc rùi
---
 

Chủ đề gần đây :

Cùng loại :

Tên file Mô tả chi tiết Ngày
NWeb.zip (1) Module đơn giản Newsweb trên Dotnetnuke v10.x.x.x10/18/2025 8:08:11 AM
vspforum.zip (11) Ma nguon vspforum ngay xua4/18/2023 6:38:37 AM
pdfjs.rar (2) pdfjs 2017 : hiển thị tốt trên iphone 11, 12, 13 không lỗi, bản 2012 sẽ lỗi trên iphone6/21/2022 11:52:48 AM
pdfjs2.rar (2) Xem file pdf bằng viewer.hml cua pdfjs (thư viện chuẩn mozilla) 2012. https://mozilla.github.io/pdf.js/getting_started/#download có thể download bản prebuild tại đây6/21/2022 11:52:04 AM
runner.zip (0) using three.js, orbitcontrol to view an object move random on map. Di chuyển 1 đồ vật ngẫu nhiên trên bản đồ, sử dụng với demo nhân viên di chuyển trong văn phòng. Toàn js download về là chạy12/5/2019 5:55:14 PM
gmap.zip (1) google map + marker7/17/2019 2:25:05 PM
vinsmarthomeservice.zip (1) java post json to api, use AsyncTask, event listener7/9/2019 5:00:10 PM
fblogin.zip (0) Login facebook bang javascript SDK7/9/2019 9:16:37 AM
autocomplete-location.zip (2) autocomplete location geo from google place, html + js7/4/2019 4:37:55 PM
WebAPI.zip (8) api for android access db (v1.0.0)7/4/2019 9:14:17 AM