惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CERT Recently Published Vulnerability Notes
V
Vulnerabilities – Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
Schneier on Security
Schneier on Security
T
Threatpost
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
T
Threat Research - Cisco Blogs
罗磊的独立博客
Security Latest
Security Latest
D
Docker
S
Secure Thoughts
博客园 - 聂微东
A
Arctic Wolf
Recorded Future
Recorded Future
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
P
Palo Alto Networks Blog
Project Zero
Project Zero
Blog — PlanetScale
Blog — PlanetScale
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Help Net Security
T
The Blog of Author Tim Ferriss
Latest news
Latest news
AWS News Blog
AWS News Blog
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
Know Your Adversary
Know Your Adversary
Vercel News
Vercel News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
F
Full Disclosure
Martin Fowler
Martin Fowler
T
The Exploit Database - CXSecurity.com
Attack and Defense Labs
Attack and Defense Labs
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
V
V2EX
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
小众软件
小众软件
宝玉的分享
宝玉的分享

博客园 - neverlost

客户端开发杂记 html5 元素 来自 nativeformelements.com 闲扯,面向对象的ext4中的一些事儿1 Ext 4 beta1 发布似乎仍不给力 .net 下比较蛋疼的word 表格转excel表格 浅述教学上基于Media Player的视频切片方式 webservice传输数据量较大的情况的解决方案 - neverlost - 博客园 现场保障系统开发过程中增加并行处理(一) vs2010中文版+codesmith 5.2 安装失败 转的 winform开发连接webservice中单向证书 .net下开发windows服务的经验 .net 写的 webservice 给java调用 ext中使用tab方式 ext做列表页面关于查询多行的办法 关于架构的问题 微软.net下 charting 要注意的事情 - neverlost .net 获取 其他类型的webservice的方式以及看法 2条路 代码生成 or 配置 2.1 2条路 代码生成 or 配置 2
ext的grid 获取页面内容方式 - neverlost - 博客园
neverlost · 2010-01-20 · via 博客园 - neverlost

Ext.onReady(function() {
            var url = "jasonGrid.aspx?Param=select&obj=ActiveCourseList";
            //字段列
            var fields =
            [
               { name: 'title' },
               { name: 'subject' },
               { name: 'context' },
               { name: 'restype' },
               { name: 'tename' },
               { name: 'teschool' },
               { name: 'pubtime' },
               { name: 'discusnum' },
               { name: 'clicknum' },
               { name: 'oper' },
               { name: 'resid' }
            ];

            //绑定数据源
            var store = new Ext.data.Store
            ({
                remoteSort: true,
                proxy: new Ext.data.HttpProxy({ url: url }),
                reader: new Ext.data.JsonReader({ totalProperty: "totalPorperty", root: "root", fields: fields })
            });

            store.on('beforeload', function() {  
               this.baseParams["txtkeyword"] = Ext.get("txtkeyword").dom.value;
               this.baseParams["ddlgradeTxt"] = Ext.get("ddlgradeTxt").dom.value;
               this.baseParams["ddlsubjectTxt"] = Ext.get("ddlsubjectTxt").dom.value;
               this.baseParams["ddlusertypeTxt"] = Ext.get("ddlusertypeTxt").dom.value;
               this.baseParams["ddlformatVal"] = Ext.get("ddlformatVal").dom.value;
               this.baseParams["ddlrestypeVal"] = Ext.get("ddlrestypeVal").dom.value;
               this.baseParams["txtsize"] = Ext.get("txtsize").dom.value;
               this.baseParams["txttecfirstname"] = Ext.get("txttecfirstname").dom.value;
               this.baseParams["txtteclastname"] = Ext.get("txtteclastname").dom.value;
               this.baseParams["txttecunit"] = Ext.get("txttecunit").dom.value;
               this.baseParams["ddltecsubjectTxt"] = Ext.get("ddltecsubjectTxt").dom.value;
               this.baseParams["txtupfirstname"] = Ext.get("txtupfirstname").dom.value;
               this.baseParams["txtuplastname"] = Ext.get("txtuplastname").dom.value;
               this.baseParams["txtupunit"] = Ext.get("txtupunit").dom.value;
               this.baseParams["ddlupsubjectTxt"] = Ext.get("ddlupsubjectTxt").dom.value;
               this.baseParams["hdresid"] = Ext.get("hdresid").dom.value;
               this.baseParams["hdkeyid"] = Ext.get("hdkeyid").dom.value;
               this.baseParams["hdknowlegeid"] = Ext.get("hdknowlegeid").dom.value;
               this.baseParams["IsOld"] = Ext.get("IsOld").dom.value;
               this.baseParams["hd"] = Ext.get("hd").dom.value;

            }); 
            //分页
            var pagingBar = new Ext.PagingToolbar
            ({
                displayInfo: true, emptyMsg: "没有数据显示", displayMsg: "显示从{0}条数据到{1}条数据,共{2}条数据",
                store: store,
                pageSize: 25
            });


            // 编辑列
            function editor(val) {
                return '<a href=\"###\" onclick=viewresource(\"' + val + '\")>查看</a><a href=\"###\" onclick=downresource(\"' + val + '\")>下载</a><a href=\"###\" onclick=recresource(\"' + val + '\")>推荐</a><a href=\"###\" onclick=shcangresource(\"' + val + '\")>收藏</a><a href=\"###\" onclick=auditresource(\"' + val + '\")>审核</a>';
            }
            // 编辑列
            function checktitle(val) {
                if (val.indexOf("样本") > 0)
                    return '<span style="color:red;">' + val + '</span>';
                else
                    return val;
            }
            // 编辑列
            function setimg(val) {
                var defaulturl = "/pageimage/icon_files_mp3.png";
                if (val == "视频课例")
                    defaulturl = "/pageimage/icon/spkl1.gif";
                else if (val == "专题研讨")
                    defaulturl = "/pageimage/icon/ztyt1.gif";
                else if (val == "教育片段")
                    defaulturl = "/pageimage/icon/jypd1.gif";
                else if (val == "课例字幕")
                    defaulturl = "/pageimage/icon/klzm1.gif";
                else if (val == "课例视频")
                    defaulturl = "/pageimage/icon/klsp1.gif";
                else if (val == "师生电脑作品")
                    defaulturl = "/pageimage/icon/dnzp1.gif";
                else if (val == "媒体素材")
                    defaulturl = "/pageimage/icon/mtsc1..gif";
                else if (val == "课件")
                    defaulturl = "/pageimage/icon/kejian1.gif";
                else if (val == "教案")
                    defaulturl = "/pageimage/icon/jiaoan1.gif";
                else if (val == "试题")
                    defaulturl = "/pageimage/icon/shiti1.gif";
                   
                return "<img src='" + defaulturl + "' border='0'>";
            }
            //加载数据
            store.load({ params: { start: 0, limit: 25} });

            // 创建grid对象
            var grid = new Ext.grid.GridPanel({
                store: store,
                columns: [
                            { header: "  ", width: 20, sortable: false, renderer: setimg, dataIndex: 'restype' },
                            { id: 'title', header: "标题", width: 250, sortable: true, dataIndex: 'title' },
                            { header: "学科", width: 50, sortable: true, dataIndex: 'subject' },
                            { header: "年级", width: 50, sortable: true, dataIndex: 'context' },
                            { header: "类型", width: 50, sortable: true, dataIndex: 'restype' },
                            { header: "执教者", width: 100, sortable: true, dataIndex: 'tename' },
                            { header: "执教者学校", width: 200, sortable: true, dataIndex: 'teschool' },
                            { header: "发布时间", width: 100, sortable: true, dataIndex: 'pubtime' },
                            { header: "点评次数", width: 50, sortable: true, dataIndex: 'discusnum' },
                            { header: "浏览次数", width: 50, sortable: true, dataIndex: 'clicknum' },
                            { header: "操作", width: 120, sortable: false, dataIndex: 'oper' }
                       ],
                stripeRows: true,
                autoExpandColumn: '标题',
                height: 500,
                width: 1000,
                viewConfig: {
                    forceFit: true

                },
                title: '搜索结果列表',
                bbar: pagingBar

            });
           
           
           
            grid.render('resourcetable');

        });
        function newwindow(val) {
            var url = "/active/CourseInfo.aspx?code="
            window.open(url + val)
        }