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();
                   
                   
           

  • 相关阅读:
    The Brain vs Deep Learning Part I: Computational Complexity — Or Why the Singularity Is Nowhere Near
    unity3d NGUI多场景共用界面制作
    python第三方库系列之十九--python測试使用的mock库
    oracle之单行函数
    Andropid自己定义组件-坐标具体解释
    [WebGL入门]二,開始WebGL之前,先了解一下canvas
    【BZOJ2318】【spoj4060】game with probability Problem 概率DP
    苹果改版之后,关于隐私协议加入的问题解决方式
    Binary Tree Level Order Traversal II
    首届中国智慧城市协同创新峰会将于6月20日在大连隆重举行
  • 原文地址:https://www.cnblogs.com/ballpenxp/p/823397.html
Copyright © 2011-2022 走看看