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


C# Grid.RenderJavascript方法代码示例

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


在下文中一共展示了Grid.RenderJavascript方法的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: CanSetRowAttr

        public void CanSetRowAttr()
        {
            var grid = new Grid("testGrid");
            grid.SetRowAttr("someJavascriptFunction()");

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

示例5: 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

示例6: 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

示例7: CanSetOnResizeStop

        public void CanSetOnResizeStop()
        {
            var grid = new Grid("testGrid");
            grid.OnResizeStop("someJavascriptFunction()");

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

示例8: CanConstructGridWithALotOfStuff


//.........这里部分代码省略.........

            var grid = new Grid("Test")
                .AddColumn(new Column("testColimn")
                               .AddClass("TestClass")
                               .SetAlign(Align.Center)
                               .SetCustomFormatter("formatter")
                               .SetFirstSortOrder(SortOrder.Asc)
                               .SetFixedWidth(true)
                               .SetHidden(true)
                               .SetIndex("flase")
                               .SetKey(true)
                               .SetLabel("truee")
                               .SetResizeable(true)
                               .SetSearch(true)
                               .SetSearchDateFormat("dd-mm")
                               .SetSearchTerms(new[] { "abdd", "asdfasf" })
                               .SetSearchType(Searchtype.Select)
                               .SetSortable(true)
                               .SetTitle(true)
                               .SetWidth(300))
                .OnAfterInsertRow("SomeScript();")
                .OnBeforeRequest("SomeScript();")
                .OnBeforeSelectRow("SomeScript();")
                .OnCellSelect("SomeScript();")
                .OnDblClickRow("SomeScript();")
                .OnGridComplete("SomeScript();")
                .OnHeaderClick("SomeScript();")
                .OnLoadBeforeSend("SomeScript();")
                .OnLoadComplete("SomeScript();")
                .OnLoadError("SomeScript();")
                .OnPaging("SomeScript();")
                .OnResizeStart("SomeScript();")
                .OnResizeStop("SomeScript();")
                .OnRightClickRow("SomeScript();")
                .OnSelectAll("SomeScript();")
                .OnSelectRow("SomeScript();")
                .OnSerializeGridData("SomeScript();")
                .OnSortCol("SomeScript();")
                .SetAltClass("class")
                .SetAltRows(true)
                .SetAutoEncode(true)
                .SetAutoWidth(true)
                .SetCaption("Caption")
                .SetDataType(DataType.Xml)
                .SetEmptyRecords("empaasdf")
                .SetFooterRow(true)
                .SetForceFit(true)
                .SetGridView(true)
                .SetHeaderTitles(true)
                .SetHeight(300)
                .SetHiddenGrid(true)
                .SetHideGrid(true)
                .SetHoverRows(true)
                .SetLoadOnce(true)
                .SetLoadText("loaddingg")
                .SetLoadUi(LoadUi.Enable)
                .SetMultiBoxOnly(true)
                .SetMultiKey(MultiKey.AltKey)
                .SetMultiSelect(true)
                .SetMultiSelectWidth(300)
                .SetPage(3)
                .SetPager("paggerrr")
                .SetPagerPos(PagerPos.Left)
                .SetPgButtons(true)
                .SetTopPager(true)
                .SetPgInput(true)
                .SetPgText("inpuasdfsaf")
                .SetRecordPos(RecordPos.Left)
                .SetRecordText("Recordafasfd")
                .SetRequestType(RequestType.Get)
                .SetResizeClass("Resdafasd")
                .SetRowList(new[] { 10, 20, 30 })
                .SetRowNum(3)
                .SetRowNumWidth(300)
                .SetRowNumbers(true)
                .SetScroll(true)
                .SetScrollOffset(300)
                .SetScrollRows(true)
                .SetScrollTimeout(12)
                .SetSearchClearButton(true)
                .SetSearchOnEnter(true)
                .SetSearchToggleButton(true)
                .SetSearchToolbar(true)
                .SetShowAllSortIcons(true)
                .SetShrinkToFit(true)
                .SetSortIconDirection(Direction.Vertical)
                .SetSortName("Gert")
                .SetSortOnHeaderClick(true)
                .SetSortOrder(SortOrder.Asc)
                .SetToolbar(true)
                .SetToolbarPosition(ToolbarPosition.Bottom)
                .SetTopPager(true)
                .SetUrl("urlasdfasd")
                .SetViewRecords(true)
                .SetWidth(300);

            #endregion

            JavascriptAssert.IsValid(grid.RenderJavascript());
        }
开发者ID:kevinblake,项目名称:MvcJqGrid,代码行数:101,代码来源: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: 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

示例11: CanSetPagerPosLeft

        public void CanSetPagerPosLeft()
        {
            var grid = new Grid("testGrid");
            grid.SetPagerPos(PagerPos.Left);

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

示例12: 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

示例13: 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

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