public void CanSetIgnoreCase() { var grid = new Grid("testGrid"); grid.SetIgnoreCase(true); StringAssert.Contains("ignoreCase:true,", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
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()); }
public static void IsValid(Column column) { var grid = new Grid("test"); grid.AddColumn(column); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnRightClickRow() { var grid = new Grid("testGrid"); grid.OnRightClickRow("someJavascriptFunction()"); StringAssert.Contains("onRightClickRow: function(rowid, iRow, iCol, e) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnHeaderClick() { var grid = new Grid("testGrid"); grid.OnHeaderClick("someJavascriptFunction()"); StringAssert.Contains("onHeaderClick: function(gridstate) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnLoadError() { var grid = new Grid("testGrid"); grid.OnLoadError("someJavascriptFunction()"); StringAssert.Contains("loadError: function(xhr, status, error) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnLoadBeforeSend() { var grid = new Grid("testGrid"); grid.OnLoadBeforeSend("someJavascriptFunction()"); StringAssert.Contains("loadBeforeSend: function(xhr, settings) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnBeforeSelectRow() { var grid = new Grid("testGrid"); grid.OnBeforeSelectRow("someJavascriptFunction()"); StringAssert.Contains("beforeSelectRow: function(rowid, e) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetWidth() { var grid = new Grid("testGrid"); grid.SetWidth(300); StringAssert.Contains("width:'300',", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetSearchToolbar() { var grid = new Grid("testGrid"); grid.SetSearchToolbar(true); StringAssert.Contains("jQuery('#testGrid').jqGrid('filterToolbar', {stringResult:true});", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetShrinkToFit() { var grid = new Grid("testGrid"); grid.SetShrinkToFit(true); StringAssert.Contains("shrinkToFit:true,", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetScrollTimeout() { var grid = new Grid("testGrid"); grid.SetScrollTimeout(20); StringAssert.Contains("scrollTimeout:20,", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetScrollRows() { var grid = new Grid("testGrid"); grid.SetScrollRows(true); StringAssert.Contains("scrollrows:true,", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetScrollOffset() { var grid = new Grid("testGrid"); grid.SetScrollOffset(39); StringAssert.Contains("scrollOffset:39,", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetRowList() { var grid = new Grid("testGrid"); grid.SetRowList(new[] { 10, 30, 300 }); StringAssert.Contains("rowList:[10,30,300],", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetUrl() { var grid = new Grid("testGrid"); grid.SetUrl("http://test.test.test/testing?test=true"); StringAssert.Contains(@"url:'http://test.test.test/testing?test=true',", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetViewRecords() { var grid = new Grid("testGrid"); grid.SetViewRecords(true); StringAssert.Contains("viewrecords:true,", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetShowAllSortIcons() { var grid = new Grid("testGrid"); grid.SetShowAllSortIcons(true); StringAssert.Contains("viewsortcols:[true,'vertical',true],", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnAfterInsertRow() { var grid = new Grid("testGrid"); grid.OnAfterInsertRow("someJavascriptFunction()"); StringAssert.Contains("afterInsertRow: function(rowid, rowdata, rowelem) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetSortIconDirectionVertical() { var grid = new Grid("testGrid"); grid.SetSortIconDirection(Direction.Vertical); StringAssert.Contains("viewsortcols:[false,'vertical',true],", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnGridComplete() { var grid = new Grid("testGrid"); grid.OnGridComplete("someJavascriptFunction()"); StringAssert.Contains("gridComplete: function() {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetSortIconDirectionVerticalToFalse() { var grid = new Grid("testGrid"); grid.SetSortOnHeaderClick(false); StringAssert.Contains("viewsortcols:[false,'vertical',false],", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetAlternateClass() { var grid = new Grid("testGrid"); grid.SetAltClass("testClass"); StringAssert.Contains("altclass:'testClass',", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetSortName() { var grid = new Grid("testGrid"); grid.SetSortName("testSortName"); StringAssert.Contains("sortname:'testSortName',", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnCellSelect() { var grid = new Grid("testGrid"); grid.OnCellSelect("someJavascriptFunction()"); StringAssert.Contains("onCellSelect: function(rowid, iCol, cellcontent, e) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetSortOrderDesc() { var grid = new Grid("testGrid"); grid.SetSortOrder(SortOrder.Desc); StringAssert.Contains("sortorder:'desc',", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnPaging() { var grid = new Grid("testGrid"); grid.OnPaging("someJavascriptFunction()"); StringAssert.Contains("onPaging: function(pgButton) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetToolbar() { var grid = new Grid("testGrid"); grid.SetToolbar(true); StringAssert.Contains("toolbar:[true,'top'],", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetOnSelectAll() { var grid = new Grid("testGrid"); grid.OnSelectAll("someJavascriptFunction()"); StringAssert.Contains("onSelectAll: function(aRowids, status) {someJavascriptFunction()},", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }
public void CanSetTopPager() { var grid = new Grid("testGrid"); grid.SetTopPager(true); StringAssert.Contains("toppager:true,", grid.ToString()); JavascriptAssert.IsValid(grid.RenderJavascript()); }