zoukankan      html  css  js  c++  java
  • ultragrid的一些用法,记录一下,以防忘记

    grid中header置顶不动
            设置displaylayout中的stationarymargins

    grid中设置数据筛选
            // The Browser, LoadOnDemand, and ViewType settings to enable XmlHttp support were done at design time.                   // Many of these setting can be done at design time but are done here to show them being set explictly.

            // Turn on Filtering
            Layout.FilterOptionsDefault.AllowRowFiltering = Infragistics.WebUI.UltraWebGrid.RowFiltering.OnServer;

            // Limit the size of the dropdown
            Layout.FilterOptionsDefault.DropDownRowCount = 10;
            Layout.FilterOptionsDefault.FilterDropDownStyle.Width = Unit.Pixel(190)

                // Turn on RowIsland Filtering
                // RowIsland filtering only filters the siblings rows of a group.  For Band Zero, all Band Zero rows are                         siblings so there
                // is little difference in the modes, however in child bands, this behavior is more evident.
            Layout.FilterOptionsDefault.RowFilterMode = Infragistics.WebUI.UltraWebGrid.RowFilterMode.SiblingRowsOnly;

            在grid的FilterPopulating中
            // Get the unique country names
            e.WorkingList.AddRange( ArrayList );
                // Tell the WebGrid not to go looking for the data.  By setting this
                // flag to true, the WebGrid uses the provided list for it's data.
                e.Handled = true;

                grid的数据源需要在InitializeDataSource中设置
                grid需要绑定在一个固定的datatable中,不可动态new的
                每一个row需要设定为isbound = true

            grid使用ajax自动读取数据
                    设置browser 未xml , LoadOnDemand为 xml ,并设置ViewType为Hierarchical即可,但是需要在InitializeDataSource中绑定数据


            grid中获得置顶的column
                    Layout.Bands[0].Columns.FromKey("Key")


            grid中分页
                    设置Pager中允许分页,分页大小
                    在InitializeDataSource绑定数据

                    自定义分页需要设置
                    Layout.Pager.StyleMode = Infragistics.WebUI.UltraWebGrid.PagerStyleMode.CustomLabels;
                    pattern设置为:<table width=100%><tr><td align=left>页码:[currentpageindex]/[pagecount] 每页:[pagesize]</td><td align=right>[default]<td></tr></table>

                    Layout.Pager.CustomLabels = letters;               
                    Page中AllowCustomPaging并在PageIndexChanged设定要显示的数据
                    比如        设定数据源为customerTable2在PageIndexChanged中设定:
                    customerTable2.DefaultView.RowFilter = "CustomerID LIKE '" + letters[e.NewPageIndex-1] + "%'";

                    letters为:
                            letters = new string[letterCount];
                            for (int i = 0 ; i < letterCount ; i++)
                                    letters[i] = ((char)((int)'A'+i)).ToString();
                   
                   
           

  • 相关阅读:
    2015/8/28 回校正常学习工作
    Asp.net自定义控件开发任我行(3)-Render
    Asp.net自定义控件开发任我行(2)-TagPrefix标签
    Asp.net自定义控件开发任我行(1)-笑傲江湖
    ET采集阿里妈妈淘宝客商品规则
    淘宝API还能用来采集数据吗?taobao.item.get 接口还能用吗?
    淘宝api升级,无法采集淘宝的数据,taobao.item.get 和taobao.taobaoke.items.get都不能用
    用firefox浏览器访问localhost,apache http server 已停止工作
    淘宝客网站怎么批量采集淘宝商品,方维采集淘宝数据思路
    方维购物分享系统怎么样,方维系统安全性检测
  • 原文地址:https://www.cnblogs.com/ballpenxp/p/823397.html
Copyright © 2011-2022 走看看