Ticket Q325521
Visible to All Users

ASPxButton - The Click event does not fire when the button is placed in ASPxGridView DataItemTemplate

created 14 years ago

The AspxButton in the Gridview doesnt fire…
Code:
     <dx:ASPxGridView ID="grdFields" runat="server" AutoGenerateColumns="False" KeyFieldName="FieldId" DataSourceID="odsFields"
                                                                                SettingsBehavior-ConfirmDelete="true" EnableViewState="false"
                                                                                SettingsText-ConfirmDelete="Möchten Sie das Feld wirklich löschen?"
                                                                                 OnHtmlRowCreated="grdFields_HtmlRowCreated" EnableCallBacks="true">

<dx:GridViewDataTextColumn VisibleIndex="4">
     <DataItemTemplate>
<dx:ASPxButton ID="btnRowUp" Border-BorderStyle="Solid" Border-BorderWidth="1px" Wrap="false" Text="Up" OnClick="btnRowUp_Click" AutoPostBack="true" runat="server" CommandArgument ='<%# Eval("FieldId") %>'></dx:ASPxButton>

<dx:ASPxButton ID="btnRowDown" Border-BorderStyle="Solid" Border-BorderWidth="1px" Wrap="false" Text="Down" OnClick="btnRowDown_Click" AutoPostBack="true" runat="server" CommandArgument ='<%# Eval("FieldId") %>'></dx:ASPxButton>
     </DataItemTemplate></dx:GridViewDataTextColumn>
Whats the problem?

Show previous comments (2)
?
Unknown 14 years ago

    Thank you Vest, for your response!
    Ridiculous but your solution with the rowcommand event worked for a while…
    now (after some refactoring etc.) it doesnt! please check my current solution, if i did something wrong!
    it's weird for me why the event isnt fired!
    thank you,
    elif

    ?
    Unknown 14 years ago

      Again the click event…
      <dx:TabPage Text="Themenseite">
                               <ContentCollection>
                                    <dx:ContentControl runat="server">
                                    <dx:ASPxButton ID="btnThemenSeiteAnlegen" UseSubmitBehavior="true" AutoPostBack="true" Width="100%" Height="30" runat="server" Text="Themenseite für das Formular anlegen…" OnClick="btnThemenSeiteAnlegen_Click" ></dx:ASPxButton>
                                         <dx:ASPxPanel ID="pnlThemaAnlegen" runat="server" Visible="false" EnableViewState="false">
                                         <PanelCollection>
                                              <dx:PanelContent>
                                                   <div style="width:150px; float:left;">Text:</div><div style="float:left;">
                                                   <dx:ASPxMemo ID="memoThemeText" runat="server" Height="71px" Width="500">
                                                   </dx:ASPxMemo>
                                                   </div>
                                                   <div style="clear:both;"></div>
                                                   <div style="width:150px; float:left;">Hintergrund-Thema:</div><div style="float:left;">
                                                        <dx:ASPxComboBox ID="comboThemen" runat="server">
                                                        </dx:ASPxComboBox>
                                                   </div>
                                                   <div style="clear:both;"></div>
                                                   <hr />
                                                   <div>Für die Werbeplatzierung, bitte setzen Sie sich schriftlich mit Martin Altersberger in Verbindung!</div>
                                                   <div style="float:right;">
                                                        <dx:ASPxButton ID="btnThemenSeiteLoeschen" Width="100%" Height="30" runat="server" Text="Themenseite löschen" OnClick="btnThemenSeiteLoeschen_Click" ></dx:ASPxButton>
                                                   </div>
                                              </dx:PanelContent>
                                         </PanelCollection>
                                         </dx:ASPxPanel>
                                    </dx:ContentControl>
                               </ContentCollection>
                          </dx:TabPage>
      there is no grid and still no button event is fired…

      DevExpress Support Team 14 years ago

        Hello Elif,
        It is possible that some code in your application does not allow a form to be posted back to the server. Can you confirm that the ID attribute is defined for the form?
        In addition, in order to help me, please provide me with a modified version of my sample (or a simplified version of your project), so that I can reproduce the issue on my side. I am asking this because the parts of your code work fine on my machine :(
        Thanks,
        Vest

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.