• <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   管理


            波多野结衣AV无码久久一区| 国产精品福利一区二区久久| 久久久久av无码免费网 | 久久国产精品无码网站| 久久99久久无码毛片一区二区| 开心久久婷婷综合中文字幕| 色综合久久综合中文综合网| 一本久久久久久久| 囯产极品美女高潮无套久久久| 精品久久一区二区三区| 中文字幕久久波多野结衣av| 精品一久久香蕉国产线看播放 | 久久精品无码专区免费青青| 99久久久久| 99久久777色| 天天躁日日躁狠狠久久| 久久久久亚洲AV无码专区桃色| 久久水蜜桃亚洲av无码精品麻豆 | 久久久久久久女国产乱让韩| 国产成人精品久久亚洲高清不卡 | 少妇精品久久久一区二区三区| 亚洲精品WWW久久久久久 | 亚洲欧美一区二区三区久久| 伊人色综合久久天天| 精品熟女少妇a∨免费久久| 久久亚洲中文字幕精品一区| 久久久国产精华液| 99久久婷婷国产一区二区| 久久精品国产精品亚洲精品| 日韩乱码人妻无码中文字幕久久| 97视频久久久| 亚洲中文字幕久久精品无码喷水| 久久久久亚洲精品日久生情| 午夜久久久久久禁播电影| 久久精品国产亚洲AV大全| 久久久久亚洲AV无码麻豆| 国产精品对白刺激久久久| 国产99久久精品一区二区| 91精品国产色综久久| 久久人人超碰精品CAOPOREN| 日批日出水久久亚洲精品tv|