我已经在向导的帮助下绑定了网格视图。但是,在生成行命令事件后,我无法看到它被触发。我知道很多时候问了问题,并且在我的代码中尝试了很多问题,但是没有一个能为我工作
这是我的代码 -
<dx:ASPxGridView ID="ASPxGridView2" KeyFieldName="NodeID" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource" onrowcommand="ASPxGridView2_RowCommand" >
<Columns>
<dx:GridViewDataTextColumn FieldName="AlarmAlias" VisibleIndex="0" ReadOnly="True">
</dx:GridViewDataTextColumn>
<dx:GridViewDataCheckColumn FieldName="asu_SMSNight" VisibleIndex="1" ReadOnly="True">
</dx:GridViewDataCheckColumn>
<dx:GridViewDataTextColumn FieldName="NodeID" VisibleIndex="2" Caption="Action">
<DataItemTemplate>
<dx:ASPxButton ID="btnAllAlarmDelete" AutoPostBack="true" Text="Delete" CommandName="Delete" CommandArgument='<%# Eval("NodeID") %>' runat="server" >
</dx:ASPxButton>
</DataItemTemplate>
</dx:GridViewDataTextColumn >
</Columns>
<Settings ShowFilterRow="true" ShowFilterBar="Hidden" ShowFilterRowMenu="true" ShowFooter="True" ShowGroupedColumns="True" ShowGroupFooter="VisibleAlways" ShowHeaderFilterButton="True" ShowHorizontalScrollBar="False" ShowVerticalScrollBar="True" VerticalScrollableHeight="100" VerticalScrollBarStyle="Virtual" />
<SettingsText EmptyDataRow="Select a category to view alarms" />
</dx:ASPxGridView>
<asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:DTUConnectionString %>"
SelectCommand="AD_FetchAlarmByBuildingCategoryUser" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:SessionParameter DefaultValue="0" Name="BuildingId" SessionField="sessionBuilding"
Type="Int32" />
<asp:SessionParameter DefaultValue="0" Name="AlarmCategoryid" SessionField="sessionCategory"
Type="Int32" />
<asp:SessionParameter DefaultValue="0" Name="UserId" SessionField="sessionUserid"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
我是开发快递的新手。请帮忙
答案 0 :(得分:0)
它解决了不知道确切的原因,但我关闭了我的vs并再次打开我的项目并重建比它自动开始工作