在命令事件上显示 ExtNet.Msg.Alert?
下面是我的代码:
<ext:GridPanel ID="gpMaster" runat="server" Title="List Of Messages" StripeRows="true"
AutoWidth="true" TrackMouseOver="true" Height="330" StoreID="stoMaster">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="ID" Header="ID" Width="50" DataIndex="ID" Resizable="false"
MenuDisabled="true" Fixed="true" Align="Right" />
<ext:Column ColumnID="Subject" Header="Subject" DataIndex="Subject" Align="Right"
Width="300">
</ext:Column>
<ext:Column Header="Sender" DataIndex="Sender" Width="100" Align="Right">
</ext:Column>
<ext:Column Header="Receive Date" DataIndex="ReceiveDate" Align="Right" Width="100">
</ext:Column>
<ext:ImageCommandColumn Width="60" Align="Right" Css="text-align:center;">
<Commands>
<ext:ImageCommand CommandName="Edit" Icon="TableEdit" Text="Edit">
</ext:ImageCommand>
</Commands>
</ext:ImageCommandColumn>
<ext:ImageCommandColumn Width="60" Align="Center">
<Commands>
<ext:ImageCommand CommandName="Delete" Icon="Delete" Text="Delete">
</ext:ImageCommand>
</Commands>
</ext:ImageCommandColumn>
</Columns>
</ColumnModel>
<DirectEvents>
<Command OnEvent="Command">
<EventMask ShowMask="true"></EventMask>
<ExtraParams>
<ext:Parameter Name="id" Value="record.data.ID" Mode="Raw" />
<ext:Parameter Name="command" Value="command" Mode="Raw" />
</ExtraParams>
</Command>
</DirectEvents>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="stoMaster"
EmptyMsg=" " DisplayMsg=" " BeforePageText="Page" Cls="LTR" />
</BottomBar>
</ext:GridPanel>
protected void Command(object sender, DirectEventArgs e)
{
int messageID = int.Parse(e.ExtraParams["id"]);
string commandName = e.ExtraParams["command"];
switch (commandName)
{
case "Edit":
ShowEditElements(messageID);
break;
case "Delete":
DeleteMessage(messageID);
break;
}
}
void ShowEditElements(int messageID)
{
ExtNet.Msg.Alert("edit", "ShowEditElements");//Problem
}
void DeleteMessage(int messageID)
{
ExtNet.Msg.Alert("del", "DeleteMessage");//Problem
}
一切正常,但 ExtNet.Msg.Alerts 没有显示! 有什么问题吗? 我该如何解决它?
Below is my code :
<ext:GridPanel ID="gpMaster" runat="server" Title="List Of Messages" StripeRows="true"
AutoWidth="true" TrackMouseOver="true" Height="330" StoreID="stoMaster">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="ID" Header="ID" Width="50" DataIndex="ID" Resizable="false"
MenuDisabled="true" Fixed="true" Align="Right" />
<ext:Column ColumnID="Subject" Header="Subject" DataIndex="Subject" Align="Right"
Width="300">
</ext:Column>
<ext:Column Header="Sender" DataIndex="Sender" Width="100" Align="Right">
</ext:Column>
<ext:Column Header="Receive Date" DataIndex="ReceiveDate" Align="Right" Width="100">
</ext:Column>
<ext:ImageCommandColumn Width="60" Align="Right" Css="text-align:center;">
<Commands>
<ext:ImageCommand CommandName="Edit" Icon="TableEdit" Text="Edit">
</ext:ImageCommand>
</Commands>
</ext:ImageCommandColumn>
<ext:ImageCommandColumn Width="60" Align="Center">
<Commands>
<ext:ImageCommand CommandName="Delete" Icon="Delete" Text="Delete">
</ext:ImageCommand>
</Commands>
</ext:ImageCommandColumn>
</Columns>
</ColumnModel>
<DirectEvents>
<Command OnEvent="Command">
<EventMask ShowMask="true"></EventMask>
<ExtraParams>
<ext:Parameter Name="id" Value="record.data.ID" Mode="Raw" />
<ext:Parameter Name="command" Value="command" Mode="Raw" />
</ExtraParams>
</Command>
</DirectEvents>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="stoMaster"
EmptyMsg=" " DisplayMsg=" " BeforePageText="Page" Cls="LTR" />
</BottomBar>
</ext:GridPanel>
protected void Command(object sender, DirectEventArgs e)
{
int messageID = int.Parse(e.ExtraParams["id"]);
string commandName = e.ExtraParams["command"];
switch (commandName)
{
case "Edit":
ShowEditElements(messageID);
break;
case "Delete":
DeleteMessage(messageID);
break;
}
}
void ShowEditElements(int messageID)
{
ExtNet.Msg.Alert("edit", "ShowEditElements");//Problem
}
void DeleteMessage(int messageID)
{
ExtNet.Msg.Alert("del", "DeleteMessage");//Problem
}
Everything is OK , But ExtNet.Msg.Alerts didn't shown !!!
What's wrong with it ?
how can I fix it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在编写代码时遇到问题。
我只好改成
问题
解决了。
I had a problem in writing the code.
I had to change
to
The problem was solved.