当前位置: 首页>>代码示例>>C#>>正文


C# Grid.ToString方法代码示例

本文整理汇总了C#中Grid.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Grid.ToString方法的具体用法?C# Grid.ToString怎么用?C# Grid.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Grid的用法示例。


在下文中一共展示了Grid.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CanConstructGrid

        public void CanConstructGrid()
        {
            var grid = new Grid("testGrid");

            StringAssert.Contains("jQuery('#testGrid').jqGrid", grid.ToString());
            StringAssert.Contains(@"<table id=""testGrid""></table>", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例2: CanAddColumn

        public void CanAddColumn()
        {
            var grid = new Grid("testGrid");
            grid.AddColumn(new Column("testColumn1"));

            StringAssert.Contains("name:'testColumn1',", grid.ToString());
            StringAssert.Contains("index:'testColumn1'", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:9,代码来源:GridTests.cs

示例3: CanAddColumnFromList

        public void CanAddColumnFromList()
        {
            var grid = new Grid("testGrid");
            IList<Column> column = new List<Column>
                                       {
                                           new Column("testColumn1")
                                       };
            grid.AddColumns(column);

            StringAssert.Contains("name:'testColumn1',", grid.ToString());
            StringAssert.Contains("index:'testColumn1'", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:13,代码来源:GridTests.cs

示例4: CanSetResizeClass

        public void CanSetResizeClass()
        {
            var grid = new Grid("testGrid");
            grid.SetResizeClass("testResizeClass");

            StringAssert.Contains("resizeclass:'testResizeClass',", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例5: CanSetRequestTypePost

        public void CanSetRequestTypePost()
        {
            var grid = new Grid("testGrid");
            grid.SetRequestType(RequestType.Post);

            StringAssert.Contains("mtype:'post',", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例6: CanSetOnPaging

        public void CanSetOnPaging()
        {
            var grid = new Grid("testGrid");
            grid.OnPaging("someJavascriptFunction()");

            StringAssert.Contains("onPaging: function(pgButton) {someJavascriptFunction()},", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例7: CanSetShowAllSortIcons

        public void CanSetShowAllSortIcons()
        {
            var grid = new Grid("testGrid");
            grid.SetShowAllSortIcons(true);

            StringAssert.Contains("viewsortcols:[true,'vertical',true],", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例8: CanSetSearchToggleButton

        public void CanSetSearchToggleButton()
        {
            var grid = new Grid("testGrid");
            grid.SetSearchToolbar(true);
            grid.SetPager("Pager");
            grid.SetSearchToggleButton(true);

            StringAssert.Contains(@"jQuery('#testGrid').jqGrid('navGrid',""#Pager"",{edit:false,add:false,del:false,search:false,refresh:false});", grid.ToString());
            StringAssert.Contains(@"jQuery('#testGrid').jqGrid('navButtonAdd',""#Pager"",{caption:""Toggle Search"",title:""Toggle Search"",buttonicon :'ui-icon-refresh', onClickButton:function(){jQuery('#testGrid')[0].toggleToolbar(); }});", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:11,代码来源:GridTests.cs

示例9: CanSetScrollRows

        public void CanSetScrollRows()
        {
            var grid = new Grid("testGrid");
            grid.SetScrollRows(true);

            StringAssert.Contains("scrollrows:true,", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例10: CanSetRowNumWidth

        public void CanSetRowNumWidth()
        {
            var grid = new Grid("testGrid");
            grid.SetRowNumWidth(300);

            StringAssert.Contains("rownumWidth:300,", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例11: CanSetPager

        public void CanSetPager()
        {
            var grid = new Grid("testGrid");
            grid.SetPager("testPager");

            StringAssert.Contains("pager:'#testPager',", grid.ToString());
            StringAssert.Contains(@"<div id=""testPager""></div>", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:9,代码来源:GridTests.cs

示例12: CanSetPage

        public void CanSetPage()
        {
            var grid = new Grid("testGrid");
            grid.SetPage(399);

            StringAssert.Contains("page:399,", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例13: CanSetOnSortCol

        public void CanSetOnSortCol()
        {
            var grid = new Grid("testGrid");
            grid.OnSortCol("someJavascriptFunction()");

            StringAssert.Contains("onSortCol: function(index, iCol, sortorder) {someJavascriptFunction()},", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例14: CanSetOnSerializeGridData

        public void CanSetOnSerializeGridData()
        {
            var grid = new Grid("testGrid");
            grid.OnSerializeGridData("someJavascriptFunction()");

            StringAssert.Contains("serializeGridData: function(postData) {someJavascriptFunction()},", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs

示例15: CanSetOnSelectRow

        public void CanSetOnSelectRow()
        {
            var grid = new Grid("testGrid");
            grid.OnSelectRow("someJavascriptFunction()");

            StringAssert.Contains("onSelectRow: function(rowid, status) {someJavascriptFunction()},", grid.ToString());
            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:8,代码来源:GridTests.cs


注:本文中的Grid.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。