• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Welcome to 陳俊峰's ---BeetleHeaded Man Blog !

              C++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
              58 隨筆 :: 32 文章 :: 18 評(píng)論 :: 0 Trackbacks

            Part 1 :Qusetion Details:(that's not really i wrote,i just quote a same sample as my encountered)?

            ?
            have a gridview and the GridView_RowEditing event is firing twice when I click the edit button and the GridView_RowDeleting event is firing twice on a single delete.? I don't think there's anything that I'm doing in my code that would cause this, but I'm including the code for the two events.? Has anyone encountered this problem?

            Here's the code for RowEditing:
            <code>
            Protected Sub gv_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gv.RowEditing
            ??????? gv.Columns(columnIndex.Delete).Visible = True
            ??????? gv.Columns(columnIndex.Id).Visible = False
            ??????? gv.EditIndex = e.NewEditIndex
            ??? End Sub
            </code>

            And here's the code for RowDeleting:
            <code>
            Protected Sub gv_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles gv.RowDeleting
            ??????? e.Cancel = True
            ??????? Dim lblFName As Label
            ??????? lblFName= CType(gv.Rows(gv.EditIndex).FindControl("lblFName"), Label)
            ??????? Dim lblLName As Label
            ??????? lblLName= CType(gv.Rows(gv.EditIndex).FindControl("lblLName"), Label)

            ??????? myObject.myClass.DeleteTemp(CType(lblBookletNum.Text, Integer), lblCare.Text)
            ??????? gvTempVisits.EditIndex = -1
            ??? End Sub
            </code>

            Part 2 : A Reply From Someone

            verify if in the declarative code of your GridView control are set the OnRowDeleting and OnRowEditing attributes. If so, remove either this attributes or the Handles clauses of your handler events.

            I mean if your gridview is declared as follows:

            [...]
            ???<asp:GridView id="gv" runat="Server" OnRowDeleting="gv_RowDeleting" OnRowEditing="gv_RowEditing"
            >
            ??????[...]
            ???</asp:GridView>
            [...]

            And in your methods to handle the events are as follows:

            [...]
            ???Protected Sub gv_RowDeleting(............)
            Handles gv.RowDeleting
            ??????[...]
            ???End Sub
            [...]

            This events will be called twice.


            Part 3: A?Great Discussion about it? i found !

            http://www.issociate.de/board/post/285047/help_please_on_GridView_commands_+_AutoEventWireUp

            posted on 2006-04-12 13:20 Jeff-Chen 閱讀(581) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): .NET

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            18岁日韩内射颜射午夜久久成人| 国产精品VIDEOSSEX久久发布| 国产aⅴ激情无码久久| 久久亚洲精品成人无码网站| 狠狠色丁香婷综合久久| 亚洲欧美国产日韩综合久久| 青草国产精品久久久久久| 久久九九免费高清视频| 久久精品水蜜桃av综合天堂| 色综合久久久久综合99| 99国产欧美精品久久久蜜芽| 一级做a爰片久久毛片免费陪| 久久精品国产免费| 久久精品国产99久久久古代 | 亚洲午夜精品久久久久久浪潮| 少妇久久久久久被弄高潮| 思思久久好好热精品国产| 日本欧美久久久久免费播放网| 精品久久久久久国产牛牛app| 三上悠亚久久精品| 久久精品国产亚洲AV忘忧草18| 久久精品国产精品亜洲毛片 | 久久毛片一区二区| 久久久久久a亚洲欧洲aⅴ| 丰满少妇人妻久久久久久| 国内精品久久久久伊人av| 午夜天堂精品久久久久| 久久久久久伊人高潮影院| 国产香蕉久久精品综合网| 久久天天婷婷五月俺也去| 人妻无码久久精品| 国内精品伊人久久久久妇| 色诱久久av| 久久国产免费直播| 亚洲精品无码久久久久去q| 久久久久亚洲AV无码专区首JN| 久久这里只精品99re66| 99精品国产综合久久久久五月天| 色诱久久久久综合网ywww| 久久国产精品成人影院| 久久国产精品久久|