altas(ajax)控件(二十):让BulletedList拥有客户端索引、分页和排序的控件
PagingBulletedList
agingBulletedList扩展器控件可以让某个ASP.NET BulletedList拥有客户端索引、分页和排序的功能。
示例运行效果:
图(1)
图(2)
图(3)
图(4)
图(5)
PagingBulletedListDemo.aspx代码示例:
<%...@ Page Language="C#" AutoEventWireup="true" CodeFile="PagingBulletedListDemo.aspx.cs" Inherits="Chapter09_PagingBulletedListDemo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>PagingBulletedList Demo</title>
<link href="styleSheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">...
/**//* PagingBulletedList */
.selectIndex
{...}{
font-weight: bold;
text-decoration:none;
}
.unselectIndex
{...}{
font-weight:normal;
text-decoration:underline;
}
</style>
<script language="javascript" type="text/javascript">...
var b1;
function pageLoad()...{
b1 = $find('PagingBulletedListBehavior1');
if (b1.get_IndexSize() == 1)...{
$get('radioOption1').checked = true;
}
if (b1.get_IndexSize() == 2)...{
$get('radioOption2').checked = true;
}
if (b1.get_MaxItemPerPage() == 10)...{
$get('radioOption3').checked = true;
}
if (b1.get_MaxItemPerPage() == 20)...{
$get('radioOption4').checked = true;
}
$get('clientSort').checked = b1.get_ClientSort();
}
function onChangeSelectOption()...{
if ($get('radioOption1').checked)...{
b1.set_MaxItemPerPage(null);
b1.set_IndexSize(1);
}
if ($get('radioOption2').checked)...{
b1.set_MaxItemPerPage(null);
b1.set_IndexSize(2);
}
if ($get('radioOption3').checked)...{
b1.set_MaxItemPerPage(10);
}
if ($get('radioOption4').checked)...{
b1.set_MaxItemPerPage(20);
}
}
function onChangeClientSort()...{
b1.set_ClientSort($get('clientSort').checked);
}
</script>
</head>
<body>
<form id="PagingBulletedListForm" runat="server">
<asp:ScriptManager ID="sm" runat="server" />
<div class="demoheading">PagingBulletedList Demonstration</div>
<div style="height:320px;overflow:auto;overflow-y:scroll;border:solid 1px #CCCCCC;">
<asp:BulletedList ID="blList" runat="server" DisplayMode="Text">
<asp:ListItem>writeln</asp:ListItem>
<asp:ListItem>1566</asp:ListItem>
<asp:ListItem>4556</asp:ListItem>
<asp:ListItem>9556776</asp:ListItem>
<asp:ListItem>12234</asp:ListItem>
<asp:ListItem>1566</asp:ListItem>
<asp:ListItem>abort</asp:ListItem>
<asp:ListItem>add</asp:ListItem>
<asp:ListItem>addBehavior</asp:ListItem>
<asp:ListItem>AddChannel</asp:ListItem>
<asp:ListItem>AddDesktopComponent</asp:ListItem>
<asp:ListItem>addElement</asp:ListItem>
<asp:ListItem>AddFavorite</asp:ListItem>
<asp:ListItem>addImport</asp:ListItem>
<asp:ListItem>addPageRule</asp:ListItem>
<asp:ListItem>addReadRequest</asp:ListItem>
<asp:ListItem>addRule</asp:ListItem>
<asp:ListItem>AddSearchProvider</asp:ListItem>
<asp:ListItem>alert</asp:ListItem>
<asp:ListItem>appendChild</asp:ListItem>
<asp:ListItem>appendData</asp:ListItem>
<asp:ListItem>applyElement</asp:ListItem>
<asp:ListItem>assign</asp:ListItem>
<asp:ListItem>attachEvent</asp:ListItem>
<asp:ListItem>AutoCompleteSaveForm</asp:ListItem>
<asp:ListItem>AutoScan</asp:ListItem>
<asp:ListItem>back</asp:ListItem>
<asp:ListItem>blur</asp:ListItem>
<asp:ListItem>BrandImageUri</asp:ListItem>
<asp:ListItem>ChooseColorDlg</asp:ListItem>
<asp:ListItem>clear</asp:ListItem>
<asp:ListItem>clear</asp:ListItem>
<asp:ListItem>clearAttributes</asp:ListItem>
<asp:ListItem>clearData</asp:ListItem>
<asp:ListItem>clearInterval</asp:ListItem>
<asp:ListItem>clearRequest</asp:ListItem>
<asp:ListItem>clearTimeout</asp:ListItem>
<asp:ListItem>click</asp:ListItem>
<asp:ListItem>cloneNode</asp:ListItem>
<asp:ListItem>close</asp:ListItem>
<asp:ListItem>close</asp:ListItem>
<asp:ListItem>collapse</asp:ListItem>
<asp:ListItem>compareEndPoints</asp:ListItem>
<asp:ListItem>componentFromPoint</asp:ListItem>
<asp:ListItem>confirm</asp:ListItem>
<asp:ListItem>contains</asp:ListItem>
<asp:ListItem>createAttribute</asp:ListItem>
<asp:ListItem>createCaption</asp:ListItem>
<asp:ListItem>createComment</asp:ListItem>
<asp:ListItem>createControlRange</asp:ListItem>
<asp:ListItem>createDocumentFragment</asp:ListItem>
<asp:ListItem>createElement</asp:ListItem>
<asp:ListItem>createEventObject</asp:ListItem>
<asp:ListItem>createPopup</asp:ListItem>
<asp:ListItem>createRange</asp:ListItem>
<asp:ListItem>createRangeCollection</asp:ListItem>
<asp:ListItem>createStyleSheet</asp:ListItem>
<asp:ListItem>createTextNode</asp:ListItem>
<asp:ListItem>createTextRange</asp:ListItem>
<asp:ListItem>createTFoot</asp:ListItem>
<asp:ListItem>createTHead</asp:ListItem>
<asp:ListItem>CustomizeSettings</asp:ListItem>
<asp:ListItem>deleteCaption</asp:ListItem>
<asp:ListItem>deleteCell</asp:ListItem>
<asp:ListItem>deleteData</asp:ListItem>
<asp:ListItem>deleteRow</asp:ListItem>
<asp:ListItem>deleteTFoot</asp:ListItem>
<asp:ListItem>deleteTHead</asp:ListItem>
<asp:ListItem>detachEvent</asp:ListItem>
<asp:ListItem>doImport</asp:ListItem>
<asp:ListItem>doReadRequest</asp:ListItem>
<asp:ListItem>doScroll</asp:ListItem>
<asp:ListItem>dragDrop</asp:ListItem>
<asp:ListItem>duplicate</asp:ListItem>
<asp:ListItem>elementFromPoint</asp:ListItem>
<asp:ListItem>empty</asp:ListItem>
<asp:ListItem>execCommand</asp:ListItem>
<asp:ListItem>execScript</asp:ListItem>
<asp:ListItem>expand</asp:ListItem>
<asp:ListItem>findText</asp:ListItem>
<asp:ListItem>fireEvent</asp:ListItem>
<asp:ListItem>firstPage</asp:ListItem>
<asp:ListItem>focus</asp:ListItem>
<asp:ListItem>forward</asp:ListItem>
<asp:ListItem>getAdjacentText</asp:ListItem>
<asp:ListItem>getAllResponseHeaders</asp:ListItem>
<asp:ListItem>getAttribute</asp:ListItem>
<asp:ListItem>getAttribute</asp:ListItem>
<asp:ListItem>getAttributeNode</asp:ListItem>
<asp:ListItem>getBookmark</asp:ListItem>
<asp:ListItem>getBoundingClientRect</asp:ListItem>
<asp:ListItem>getCharset</asp:ListItem>
<asp:ListItem>getClientRects</asp:ListItem>
<asp:ListItem>getData</asp:ListItem>
<asp:ListItem>getElementById</asp:ListItem>
<asp:ListItem>getElementsByName</asp:ListItem>
<asp:ListItem>getElementsByTagName</asp:ListItem>
<asp:ListItem>getExpression</asp:ListItem>
<asp:ListItem>getNamedItem</asp:ListItem>
<asp:ListItem>getResponseHeader</asp:ListItem>
<asp:ListItem>go</asp:ListItem>
<asp:ListItem>hasChildNodes</asp:ListItem>
<asp:ListItem>hasFeature</asp:ListItem>
<asp:ListItem>hasFocus</asp:ListItem>
<asp:ListItem>hide</asp:ListItem>
<asp:ListItem>inRange</asp:ListItem>
<asp:ListItem>insertAdjacentElement</asp:ListItem>
<asp:ListItem>insertAdjacentHTML</asp:ListItem>
<asp:ListItem>insertAdjacentText</asp:ListItem>
<asp:ListItem>insertBefore</asp:ListItem>
<asp:ListItem>insertCell</asp:ListItem>
<asp:ListItem>insertData</asp:ListItem>
<asp:ListItem>insertRow</asp:ListItem>
<asp:ListItem>isEqual</asp:ListItem>
<asp:ListItem>item</asp:ListItem>
<asp:ListItem>javaEnabled</asp:ListItem>
<asp:ListItem>lastPage</asp:ListItem>
<asp:ListItem>mergeAttributes</asp:ListItem>
<asp:ListItem>move</asp:ListItem>
<asp:ListItem>moveBy</asp:ListItem>
<asp:ListItem>moveEnd</asp:ListItem>
<asp:ListItem>moveRow</asp:ListItem>
<asp:ListItem>moveStart</asp:ListItem>
<asp:ListItem>moveTo</asp:ListItem>
<asp:ListItem>moveToBookmark</asp:ListItem>
<asp:ListItem>moveToElementText</asp:ListItem>
<asp:ListItem>moveToPoint</asp:ListItem>
<asp:ListItem>namedItem</asp:ListItem>
<asp:ListItem>namedRecordset</asp:ListItem>
<asp:ListItem>navigate</asp:ListItem>
<asp:ListItem>nextPage</asp:ListItem>
<asp:ListItem>normalize</asp:ListItem>
<asp:ListItem>open</asp:ListItem>
<asp:ListItem>parentElement</asp:ListItem>
<asp:ListItem>pasteHTML</asp:ListItem>
<asp:ListItem>previousPage</asp:ListItem>
<asp:ListItem>print</asp:ListItem>
<asp:ListItem>prompt</asp:ListItem>
<asp:ListItem>queryCommandEnabled</asp:ListItem>
<asp:ListItem>queryCommandIndeterm</asp:ListItem>
<asp:ListItem>queryCommandState</asp:ListItem>
<asp:ListItem>queryCommandSupported</asp:ListItem>
<asp:ListItem>queryCommandValue</asp:ListItem>
<asp:ListItem>recalc</asp:ListItem>
<asp:ListItem>refresh</asp:ListItem>
<asp:ListItem>releaseCapture</asp:ListItem>
<asp:ListItem>reload</asp:ListItem>
<asp:ListItem>remove</asp:ListItem>
<asp:ListItem>removeAttribute</asp:ListItem>
<asp:ListItem>removeAttributeNode</asp:ListItem>
<asp:ListItem>removeBehavior</asp:ListItem>
<asp:ListItem>removeChild</asp:ListItem>
<asp:ListItem>removeExpression</asp:ListItem>
<asp:ListItem>removeNamedItem</asp:ListItem>
<asp:ListItem>removeNode</asp:ListItem>
<asp:ListItem>removeRule</asp:ListItem>
<asp:ListItem>replace</asp:ListItem>
<asp:ListItem>replaceAdjacentText</asp:ListItem>
<asp:ListItem>replaceChild</asp:ListItem>
<asp:ListItem>replaceData</asp:ListItem>
<asp:ListItem>replaceNode</asp:ListItem>
<asp:ListItem>reset</asp:ListItem>
<asp:ListItem>resizeBy</asp:ListItem>
<asp:ListItem>resizeTo</asp:ListItem>
<asp:ListItem>scroll</asp:ListItem>
<asp:ListItem>scrollBy</asp:ListItem>
<asp:ListItem>scrollIntoView</asp:ListItem>
<asp:ListItem>scrollTo</asp:ListItem>
<asp:ListItem>select</asp:ListItem>
<asp:ListItem>select</asp:ListItem>
<asp:ListItem>send</asp:ListItem>
<asp:ListItem>setActive</asp:ListItem>
<asp:ListItem>setAttribute</asp:ListItem>
<asp:ListItem>setAttributeNode</asp:ListItem>
<asp:ListItem>setCapture</asp:ListItem>
<asp:ListItem>setData</asp:ListItem>
<asp:ListItem>setEndPoint</asp:ListItem>
<asp:ListItem>setExpression</asp:ListItem>
<asp:ListItem>setInterval</asp:ListItem>
<asp:ListItem>setNamedItem</asp:ListItem>
<asp:ListItem>setRequestHeader</asp:ListItem>
<asp:ListItem>setTimeout</asp:ListItem>
<asp:ListItem>show</asp:ListItem>
<asp:ListItem>showHelp</asp:ListItem>
<asp:ListItem>showModalDialog</asp:ListItem>
<asp:ListItem>showModelessDialog</asp:ListItem>
<asp:ListItem>splitText</asp:ListItem>
<asp:ListItem>start</asp:ListItem>
<asp:ListItem>stop</asp:ListItem>
<asp:ListItem>submit</asp:ListItem>
<asp:ListItem>substringData</asp:ListItem>
<asp:ListItem>swapNode</asp:ListItem>
<asp:ListItem>tags</asp:ListItem>
<asp:ListItem>taintEnabled</asp:ListItem>
<asp:ListItem>urns</asp:ListItem>
<asp:ListItem>write</asp:ListItem>
<asp:ListItem>writeln</asp:ListItem>
</asp:BulletedList>
<ajaxToolkit:PagingBulletedListExtender ID="ple" runat="server"
BehaviorID="PagingBulletedListBehavior1"
TargetControlID="blList"
ClientSort="true"
IndexSize="1"
Separator=" - "
SelectIndexCssClass="selectIndex"
UnselectIndexCssClass="unselectIndex" />
<!--
TargetControlID:该扩展器目标BulletedList控件的ID,即将要被添加客户端索引、分页和排序功能的BulletedList的ID
ClientSort:若该属性设置为true,那么目标BulletedList控件中的项将在客户端自动进行排序
Height:目标BulletedList控件加上其上方的该扩展器控件添加的索引链接总高度
IndexSize:索引的长度,即索引中每一项所包含的字符数目
MaxItemPerPage:每一页的最大条目数
Separator:索引中项的分隔符
SelectIndexCssClass:被选中的索引将应用的CSS Class
UnselectIndexCssClass:未被选中的索引将应用的CSS Class
-->
</div>
<input id="radioOption1" name="radioOption" type="radio" value="1" onclick="onChangeSelectOption()" />
<label for="radioOption1">Index size 1</label>
<input id="radioOption3" name="radioOption" type="radio" value="3" onclick="onChangeSelectOption()" />
<label for="radioOption3">10 Items per page</label><br />
<input id="radioOption2" name="radioOption" type="radio" value="2" onclick="onChangeSelectOption()" />
<label for="radioOption2">Index size 2</label>
<input id="radioOption4" name="radioOption" type="radio" value="4" onclick="onChangeSelectOption()" />
<label for="radioOption4">20 Items per page</label><br />
<input type="checkbox" id="clientSort" onclick="onChangeClientSort()" />
<label for="clientSort">Sort</label>
</form>
</body>
</html>
http://asp.net/AJAX/Control-Toolkit/Live/PagingBulletedList/PagingBulletedList.aspx
转载于:https://www.cnblogs.com/hainange/archive/2007/10/21/6153324.html
altas(ajax)控件(二十):让BulletedList拥有客户端索引、分页和排序的控件相关推荐
- 【MySQL从入门到精通】【高级篇】(二十六)建了索引就能用么?我看未必。来看看几种索引失效的情况吧
您好,我是码农飞哥(wei158556),感谢您阅读本文,欢迎一键三连哦.
- altas(ajax)控件(二十三):等级选择控件Rating
一. 简介 等级选择控件Rating提供了一种全新的方式来进行等级选择,在以往的web上我们只能通过使用特殊字符"☆"来表达等级,有了等级选择控件Rating我 ...
- Scott Mitchell 的ASP.NET 2.0数据教程之二十四:: 分页和排序报表数据
下载代码示例 | 下载PDF格式英文教程 导言 分页和排序是在WEB应用程序中展现数据常见的功能.比如,当我们在一个网上书店搜索ASP.NET书籍的时候,可能有几百本相关书籍,但是我们只希望每页显示1 ...
- ASP.NET 2.0数据教程之二十四:: 分页和排序报表数据
导言 分页和排序是在WEB应用程序中展现数据常见的功能.比如,当我们在一个网上书店搜索ASP.NET书籍的时候,可能有几百本相关书籍,但是我们只希望每页显示10条有效记录.而且,我们还希望结果能根据标 ...
- 鸡啄米之VS2010/MFC编程入门之二十四(常用控件:列表框控件ListBox)
目录 一.目的: 1.点击列表框某个变量后,编辑框就显示出来这个变量名字 一.参考: 1.VS2010/MFC编程入门之二十四(常用控件:列表框控件ListBox) ①总结:good:亲测有效,适合多 ...
- VS2010/MFC编程入门之二十九(常用控件:列表视图控件List Control 下)
上一节是关于列表视图控件List Control的上半部分,简单介绍了列表视图控件,其通知消息的处理和有关结构体的定义.本节继续讲解下半部分,包括列表视图控件的创建.CListCtrl类的主要成员函数 ...
- JavaFX UI控件教程(二十六)之Pagination Control
翻译自 Pagination Control 本章介绍如何向JavaFX应用程序添加分页控件.它教授如何向应用程序添加分页控件,管理其页面项,以及使用CSS样式设置控件元素的样式. 分页控件,用于浏 ...
- QRowTable表格控件(二)-红涨绿跌
文章目录 一.开心一刻 二.概述 三.效果展示 四.任务需求 五.指定列排序 六.排序 七.列对其方式 八.相关文章 原文链接: QRowTable表格控件(二)-红涨绿跌 一.开心一刻 一天,五娃和 ...
- C# 系统应用之ListView控件 (二).加载选中节点文件夹下文件信息
在项目中的前面一篇文章"C# 系统应用之TreeView控件 (一).显示树状磁盘文件目录及加载图标"中我讲述了如何使用TreeView控件树状实现显示"我的电脑&quo ...
最新文章
- 为什么MobileNet的参数这么少
- 平头哥玄铁处理器Linux新版本,5大亮点速览
- 高性能javascript 文件加载阻塞
- FreeBSD学习总结
- python递归面试题_python面试题
- tensorflow 滑动平均使用和恢复
- C++ #define详解
- 沼跃鱼早已看穿了一切 C/C++
- hibernate框架学习之使用SQLQuery查询数据
- 【包邮送书活动】20210924期-开奖通知
- 日志对于运维的重要性
- 软件也要歧视大龄程序员吗?
- Adblock Plus无法屏蔽CSDN右下角广告解决
- js获取屏幕宽度方法大全
- XUI 熟练使用之(四) ----------- 各种弹出对话框的详细介绍
- rl滤波器原理_RL低通滤波器的原理是什么
- 基于ESP32的智能家居控制系统-微信小程序界面
- [论文笔记] Sigcomm 2018 Elastic Sketch: Adaptive and Fast Network-wide Measurements
- Kotlin版注解处理器Annotation Processor
- Deepin系统Beyond Compare下载安装以及无法使用解决办法