本文整理汇总了C#中MonoTests.System.Web.UI.WebControls.PokerGridView.DoOnRowCommand方法的典型用法代码示例。如果您正苦于以下问题:C# PokerGridView.DoOnRowCommand方法的具体用法?C# PokerGridView.DoOnRowCommand怎么用?C# PokerGridView.DoOnRowCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoTests.System.Web.UI.WebControls.PokerGridView
的用法示例。
在下文中一共展示了PokerGridView.DoOnRowCommand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GridView_Events
public void GridView_Events ()
{
PokerGridView gv = new PokerGridView ();
gv.DataSource = myds;
gv.DataBinding += new EventHandler (gv_DataBinding);
gv.DataBound += new EventHandler (gv_DataBound);
gv.PageIndexChanging += new GridViewPageEventHandler (gv_PageIndexChanging);
gv.PageIndexChanged += new EventHandler (gv_PageIndexChanged);
gv.PreRender += new EventHandler (gv_PreRender);
gv.RowCancelingEdit += new GridViewCancelEditEventHandler (gv_RowCancelingEdit);
gv.RowCommand += new GridViewCommandEventHandler (gv_RowCommand);
gv.RowCreated += new GridViewRowEventHandler (gv_RowCreated);
gv.RowDataBound += new GridViewRowEventHandler (gv_RowDataBound);
gv.RowDeleted += new GridViewDeletedEventHandler(gv_RowDeleted);
gv.RowDeleting+= new GridViewDeleteEventHandler(gv_RowDeleting);
gv.RowEditing+=new GridViewEditEventHandler(gv_RowEditing);
gv.RowUpdated+= new GridViewUpdatedEventHandler(gv_RowUpdated);
gv.RowUpdating+=new GridViewUpdateEventHandler(gv_RowUpdating);
gv.SelectedIndexChanged +=new EventHandler(gv_SelectedIndexChanged);
gv.SelectedIndexChanging+=new GridViewSelectEventHandler(gv_SelectedIndexChanging);
gv.Sorted +=new EventHandler(gv_Sorted);
gv.Sorting +=new GridViewSortEventHandler(gv_Sorting);
gv.Unload+=new EventHandler(gv_Unload);
Assert.AreEqual (false, dataBinding, "BeforeDataBinding");
gv.DoOnDataBinding (new EventArgs ());
Assert.AreEqual (true, dataBinding, "AfterDataBinding");
Assert.AreEqual (false, dataBound, "BeforeDataBound");
gv.DoOnDataBound (new EventArgs ());
Assert.AreEqual (true, dataBound, "AfterDataBound");
Assert.AreEqual (false, pageIndexChanged, "BeforepageIndexChanged");
gv.DoOnPageIndexChanged (new EventArgs ());
Assert.AreEqual (true, pageIndexChanged, "AfterpageIndexChanged");
ResetEvents ();
Assert.AreEqual (false, pageIndexChanging, "BeforepageIndexChanging");
gv.DoOnPageIndexChanging (new GridViewPageEventArgs(1));
Assert.AreEqual (true, pageIndexChanging, "AfterpageIndexChanging");
Assert.AreEqual (false, preRender, "BeforePreRender");
gv.DoOnPreRender (new EventArgs ());
Assert.AreEqual (true, preRender, "AfterPreRender");
ResetEvents ();
Assert.AreEqual (false, gridViewCancelEdit, "BeforeGridViewCancelEdit");
gv.DoOnRowCancelingEdit (new GridViewCancelEditEventArgs (1));
Assert.AreEqual (true, gridViewCancelEdit, "AfterGridViewCancelEdit");
ResetEvents ();
Assert.AreEqual (false, rowCommand, "BeforeRowCommand");
LinkButton lb= new LinkButton();
gv.DoOnRowCommand (new GridViewCommandEventArgs(lb,new CommandEventArgs("",null)));
Assert.AreEqual (true, rowCommand, "AfterRowCommand");
Assert.AreEqual (false, rowCreated, "BeforeRowCreated");
gv.DoOnRowCreated (new GridViewRowEventArgs (gv.SelectedRow));
Assert.AreEqual (true, rowCommand, "AfterRowCreated");
Assert.AreEqual (false, rowDataBound, "BeforeRowDataBound");
gv.DoOnRowDataBound (new GridViewRowEventArgs (gv.SelectedRow));
Assert.AreEqual (true, rowDataBound, "AfterRowDataBound");
Assert.AreEqual (false, rowDeleted, "BeforeRowDeleted");
gv.DoOnRowDeleted(new GridViewDeletedEventArgs(1,new ArgumentException()));
Assert.AreEqual (true, rowDeleted, "AfterRowDeleted");
ResetEvents ();
Assert.AreEqual (false, rowDeleting, "BeforeRowDeleting");
gv.DoOnRowDeleting (new GridViewDeleteEventArgs (0));
Assert.AreEqual (true, rowDeleting, "AfterRowDeleting");
ResetEvents ();
Assert.AreEqual (false, rowEditing, "BeforeRowEditing");
gv.DoOnRowEditing (new GridViewEditEventArgs (0));
Assert.AreEqual (true, rowEditing, "AfterRowEditing");
Assert.AreEqual (false, rowUpdated, "BeforeRowUpdated");
gv.DoOnRowUpdated (new GridViewUpdatedEventArgs(1,new Exception()));
Assert.AreEqual (true, rowUpdated, "AfterRowUpdated");
ResetEvents ();
Assert.AreEqual (false, rowUpdating, "BeforeRowUpdating");
gv.DoOnRowUpdating (new GridViewUpdateEventArgs (0));
Assert.AreEqual (true, rowUpdating, "AfterRowUpdating");
Assert.AreEqual (false, selectIndexChanged, "BeforeSelectedIndexChanged");
gv.DoOnSelectedIndexChanged (new EventArgs ());
Assert.AreEqual (true, selectIndexChanged, "AfterSelectedIndexChanged");
ResetEvents ();
Assert.AreEqual (false, selectIndexChanging, "BeforeSelectedIndexChanging");
gv.DoOnSelectedIndexChanging (new GridViewSelectEventArgs (2));
Assert.AreEqual (true, selectIndexChanging, "AfterSelectedIndexChanging");
Assert.AreEqual (false, sorted, "BeforeSorted");
gv.DoOnSorted (new EventArgs ());
Assert.AreEqual (true, sorted, "AfterSorted");
Assert.AreEqual (false, sorting, "BeforeSorting");
gv.DoOnSorting(new GridViewSortEventArgs("",SortDirection.Ascending));
Assert.AreEqual (true, sorting, "AfterSorting");
Assert.AreEqual (false, unload, "BeforeUnload");
gv.DoOnUnload (new EventArgs ());
Assert.AreEqual (true, unload, "AfterUnload");
}