本文整理汇总了C#中MonoTests.System.Web.UI.WebControls.PokerGridView.DoOnBubbleEvent方法的典型用法代码示例。如果您正苦于以下问题:C# PokerGridView.DoOnBubbleEvent方法的具体用法?C# PokerGridView.DoOnBubbleEvent怎么用?C# PokerGridView.DoOnBubbleEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoTests.System.Web.UI.WebControls.PokerGridView
的用法示例。
在下文中一共展示了PokerGridView.DoOnBubbleEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GridView_BubbleEvent
public void GridView_BubbleEvent ()
{
PokerGridView gv = new PokerGridView ();
Page page = new Page ();
LinkButton lb = new LinkButton ();
gv.AllowPaging = true;
page.Controls.Add (gv);
gv.DataSource = myds;
gv.DataBind ();
gv.EditIndex = 0;
//
gv.RowDeleting += new GridViewDeleteEventHandler (gv_RowDeleting);
gv.RowUpdating += new GridViewUpdateEventHandler (gv_RowUpdating);
gv.RowEditing += new GridViewEditEventHandler (gv_RowEditing);
gv.Sorting += new GridViewSortEventHandler (gv_Sorting);
gv.RowCancelingEdit += new GridViewCancelEditEventHandler (gv_RowCancelingEdit);
gv.SelectedIndexChanging+=new GridViewSelectEventHandler(gv_SelectedIndexChanging);
gv.PageIndexChanging+=new GridViewPageEventHandler(gv_PageIndexChanging);
// Delete
GridViewCommandEventArgs com1 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Delete", "0"));
Assert.AreEqual (false, bubbledeleterow, "BeforeBubbleEventDeleteRow");
gv.DoOnBubbleEvent (gv, com1);
Assert.AreEqual (true, bubbledeleterow, "AfterBubbleEventDeleteRow");
// Update
GridViewCommandEventArgs com2 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Update", "0"));
Assert.AreEqual (false, bubbleupdaterow, "BeforeBubbleEventUpdateRow");
gv.DoOnBubbleEvent (gv, com2);
Assert.AreEqual (true, bubbleupdaterow, "AfterBubbleEventUpdateRow");
// Edit
GridViewCommandEventArgs com3 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Edit", "0"));
Assert.AreEqual (false, bubbleeditingrow, "BeforeBubbleEventEditingRow");
gv.DoOnBubbleEvent (gv, com3);
Assert.AreEqual (true, bubbleeditingrow, "AfterBubbleEventEditingRow");
// Sort
gv.AllowSorting = true;
GridViewCommandEventArgs com4 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Sort", null));
Assert.AreEqual (false, bubblesortint, "BeforeBubbleEventSortingRow");
gv.DoOnBubbleEvent (gv, com4);
Assert.AreEqual (true, bubblesortint, "AfterBubbleEventSortingRow");
// Canceling Edit
GridViewCommandEventArgs com5 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Cancel", null));
Assert.AreEqual (false, bubblecanceling, "BeforeBubbleEventcancelingEdit");
gv.DoOnBubbleEvent (gv, com5);
Assert.AreEqual (true, bubblecanceling, "AfterBubbleEventcancelingEdit");
// Select
GridViewCommandEventArgs com6 = new GridViewCommandEventArgs (gv.SelectedRow, lb, new CommandEventArgs ("Select", "2"));
Assert.AreEqual (false, bubbleselect, "BeforeBubbleEventSelect");
gv.DoOnBubbleEvent (gv, com6);
Assert.AreEqual (true, bubbleselect, "AfterBubbleEventSelect");
//Next Page
GridViewCommandEventArgs com7 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "Next"));
Assert.AreEqual (false, bubblepage, "BeforeBubbleEventNextPage");
gv.DoOnBubbleEvent (gv, com7);
Assert.AreEqual (true, bubblepage, "AfterBubbleEventNextPage");
Assert.AreEqual (1, newPageIndex, "NextPage");
// Prev Page
ResetEvents ();
GridViewCommandEventArgs com8 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "Prev"));
Assert.AreEqual (false, bubblepage, "BeforeBubbleEventPrevPage");
gv.DoOnBubbleEvent (gv, com8);
Assert.AreEqual (true, bubblepage, "AfterBubbleEventPrevPage");
Assert.AreEqual (-1, newPageIndex, "PrevPage");
ResetEvents ();
GridViewCommandEventArgs com9 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "Last"));
Assert.AreEqual (false, bubblepage, "BeforeBubbleEventLastPage");
gv.DoOnBubbleEvent (gv, com9);
Assert.AreEqual (true, bubblepage, "AfterBubbleEventLastPage");
ResetEvents ();
GridViewCommandEventArgs com10 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "First"));
Assert.AreEqual (false, bubblepage, "BeforeBubbleEventFirstPage");
gv.DoOnBubbleEvent (gv, com10);
Assert.AreEqual (true, bubblepage, "AfterBubbleEventFirstPage");
Assert.AreEqual (0, newPageIndex, "FirstPage");
}