[翻译]Javascript Dataset, Data Repeater and Grid
2009-02-16 22:44
274 查看
Javascript Dataset, Data Repeater and Grid
By Mahdi Yousefi
原文:http://www.codeproject.com/KB/grid/DatasetAndDataRepeater.aspx
源码及实例下载:dataset-sample.zip
ds.renderHeader = function() {
var tmp = this.getHeaderTemplate();
if (this.headerSort) {
var regex = new RegExp('eval/sort-(\\w*)/');
var result;
while (regex.test(tmp)) {
result = regex.exec(tmp);
tmp = tmp.replace(regex,
"javascript:" + this.pagerName
+ ".sort('" + result[1] + "')");
};
};
return tmp;
};
[/code]
在上面的例子中,我用了像"eval/sort-colA" , "eval/sort-col2"等变量。这个函数就是把他们找出来然后替换成javascript:dsPager.sort('colA')……
By Mahdi Yousefi
原文:http://www.codeproject.com/KB/grid/DatasetAndDataRepeater.aspx
源码及实例下载:dataset-sample.zip
Introduction
Codeds.renderHeader = function() {
var tmp = this.getHeaderTemplate();
if (this.headerSort) {
var regex = new RegExp('eval/sort-(\\w*)/');
var result;
while (regex.test(tmp)) {
result = regex.exec(tmp);
tmp = tmp.replace(regex,
"javascript:" + this.pagerName
+ ".sort('" + result[1] + "')");
};
};
return tmp;
};
[/code]
在上面的例子中,我用了像"eval/sort-colA" , "eval/sort-col2"等变量。这个函数就是把他们找出来然后替换成javascript:dsPager.sort('colA')……
相关文章推荐
- 【翻译】苹果官网的命名规范之 Naming Properties and Data Types
- asp and javascript: sql server export data to csv and to xls
- [翻译]JavaScript秘密花园 - scope, namespace, constructor, equality and comparisons
- Introduction to graphs and their data structures Section I[翻译]
- 17个使用AJAX技术的数据表格控件解决方案(Data Grids with AJAX, DHTML and JavaScript)
- Note---Data Contract:DataTable,DataSet,Generic and Collection
- 【翻译】Data Access with LINQ to SQL (1) -- New C# and VB.NET Language Features
- Along with all the above benefits, you cannot overlook the space efficiency and performance gains in using DataFrames and Dataset APIs for two reasons.
- spark第六篇:Spark SQL, DataFrame and Dataset Guide
- DataSet and DataAdapter
- C Primer Plus. Fifth Edition 翻译Chapter 3 数据和C (Data and C)第一部分
- C Primer Plus. Fifth Edition 翻译Chapter 3 数据和C (Data and C)之二
- Displaying a Sorted, Paged, and Filtered Grid of Data in ASP.NET MVC
- 我的MVC之旅(4)-------Models and Data Access[翻译]
- JavaScript Scoping and Hoisting 翻译
- Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView (翻译)
- Using ASP.NET 3.5's ListView and DataPager Controls: Grouping Data with the ListView Control (翻译)
- How To Display Hierarchical Data by Using Nested Repeater Controls and Visual C# .NET(ZT)
- Javascript学习笔记----DataType and Values
- CS001496 - Gather data from web page with JavaScript, WebKit, and Qt