Question

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="&nbsp;" DisplayMsg="&nbsp;" 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 ?

Was it helpful?

Solution

I had a problem in writing the code.
I had to change

ExtNet.Msg.Alert("edit", "ShowEditElements");

to

ExtNet.Msg.Alert("edit", "ShowEditElements").Show(); 

The problem was solved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top