GridPanel commands loading mask

  1. #1

    GridPanel commands loading mask


    I have the following GridPanel with row commands:

    	Title="SME Registered Visitors" 
    		<ext:Store runat="server">
    				<ext:Model runat="server" >
    						<ext:ModelField Name="ID" />
    						<ext:ModelField Name="ReferenceNumberID" />
    	<ColumnModel runat="server">
    			<ext:RowNumbererColumn Header="#" runat="server"  Align="Center" />            
    			<ext:Column runat="server" Align="Center" Text="Ref. Number" DataIndex="ReferenceNumberID" />
    			<ext:CommandColumn runat="server" Width="120">
    				<ext:GridCommand Icon="ArrowDown">
    					<Menu EnableScrolling="false">
    							<ext:MenuCommand Text="Send English Email" Icon="Email" CommandName="EnMail" />
    							<ext:MenuCommand Text="Send Arabic Email" Icon="Email" CommandName="ArMail" />
    					<ToolTip Text="Re-sending Welcoming Email" />
    				<ext:CommandSeparator />
    				<ext:GridCommand Icon="Delete" CommandName="Delete">
    					<ToolTip Text="Delete" />
    				<ext:CommandSeparator />
    				<ext:GridCommand Icon="NoteEdit" CommandName="Edit">
    					<ToolTip Text="Edit" />
    				<ext:CommandSeparator />
    				<ext:GridCommand Icon="DiskDownload" CommandName="Download">
    					<ToolTip Text="Download Attachment" />
    				<PrepareToolbar Fn="prepareVisitorsGridToolbar" />
    					<Command  Handler="#{DirectMethods}.routeCommand(command,, { isUpload: true });" />
    Note that I remove un-needed definitions to simplify the code.

    What I want to achieve is to show loading/sending message over the grid itself when the user choose send email command:

    <ext:MenuCommand Text="Send English Email" Icon="Email" CommandName="EnMail" />
    <EventMask ShowMask="true" Msg="Sending..." Target="CustomTarget" CustomTarget="={#{VisitorsGV}.body}" />
    How to achieve this?

  2. #2
    Any updates?
  3. #3

    No updates?
    Is it possible?

    Why long time no answer.

    Ali Alaswad
  4. #4

    You can set mask on DirectMethod attribute or set mask in config object and pass to direct method as last argument

    Please see the following sample ()section 7
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    Thanks Vladimir,

    <Command  Handler="#{DirectMethods}.routeCommand(command,,  { isUpload:  true , eventMask: { showMask: true, minDelay: 500, msg: 'Sending...'}});" />

    But the problem is: the loading is shown for all commands of the grid, I want to display mask only with "EnMail" and "ArMail".

    Last edited by Alaswad; Oct 12, 2014 at 11:12 AM.
  6. #6
    Please don't use the "eventMask" config for all the commands except those that you need a mask with.
  7. #7

    How to achieve that?
  8. #8
    I guess something like that:

    if (command === "command1" || command === "command2") {, { eventMask: { ... }});
    } else {;

Similar Threads

  1. Replies: 1
    Last Post: May 08, 2014, 3:24 PM
  2. [CLOSED] [Razor] GridPanel ColumnModel Commands
    By Timothy in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 09, 2012, 10:39 PM
  3. [CLOSED] Gridpanel Loading Mask?
    By Timothy in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: May 04, 2012, 2:37 PM
  4. [CLOSED] Customising GridPanel loading mask
    By daneel in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 28, 2011, 2:29 PM
  5. GridPanel with Image Commands, mulitple fires
    By rthiney in forum 1.x Help
    Replies: 1
    Last Post: Aug 11, 2009, 2:50 PM

Posting Permissions