GridPanel commands loading mask

  1. #1

    GridPanel commands loading mask

    Dears,

    I have the following GridPanel with row commands:

    <ext:GridPanel 
    	runat="server" 
    	ID="VisitorsGV"
    	ClientIDMode="Static"
    	Title="SME Registered Visitors" 
    	Frame="true"
    	Height="500"
    	width="600">
    	<Store>
    		<ext:Store runat="server">
    			<Model>
    				<ext:Model runat="server" >
    					<Fields>
    						<ext:ModelField Name="ID" />
    						<ext:ModelField Name="ReferenceNumberID" />
    						...
    						..
    						.                                  
    					</Fields>
    				</ext:Model>
    			</Model>
    		</ext:Store>
    	</Store>
    	<ColumnModel runat="server">
    		<Columns>
    			<ext:RowNumbererColumn Header="#" runat="server"  Align="Center" />            
    			<ext:Column runat="server" Align="Center" Text="Ref. Number" DataIndex="ReferenceNumberID" />
    			...
    			..
    			.    
    			<ext:CommandColumn runat="server" Width="120">
    			<Commands>
    				<ext:GridCommand Icon="ArrowDown">
    					<Menu EnableScrolling="false">
    						<Items>
    							<ext:MenuCommand Text="Send English Email" Icon="Email" CommandName="EnMail" />
    							<ext:MenuCommand Text="Send Arabic Email" Icon="Email" CommandName="ArMail" />
    						</Items>
    					</Menu>
    
    					<ToolTip Text="Re-sending Welcoming Email" />
    				</ext:GridCommand>
    				<ext:CommandSeparator />
    				<ext:GridCommand Icon="Delete" CommandName="Delete">
    					<ToolTip Text="Delete" />
    				</ext:GridCommand>
    				<ext:CommandSeparator />
    				<ext:GridCommand Icon="NoteEdit" CommandName="Edit">
    					<ToolTip Text="Edit" />
    				</ext:GridCommand>
    				<ext:CommandSeparator />
    				<ext:GridCommand Icon="DiskDownload" CommandName="Download">
    					<ToolTip Text="Download Attachment" />
    				</ext:GridCommand>  
    			</Commands>
    				<PrepareToolbar Fn="prepareVisitorsGridToolbar" />
    				<Listeners> 
    					<Command  Handler="#{DirectMethods}.routeCommand(command, record.data.ID, { isUpload: true });" />
    				</Listeners>
    			</ext:CommandColumn>
    		</Columns>
    	</ColumnModel>
    </ext:GridPanel>
    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?

    Regards,
    Ali
  2. #2
    Any updates?
  3. #3
    Dears,

    No updates?
    Is it possible?

    Why long time no answer.

    Regards,
    Ali Alaswad
  4. #4
    Hi

    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
    https://examples2.ext.net/#/Events/D...hods/Overview/
  5. #5
    Thanks Vladimir,

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

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

    Regards,
    Ali
    Last edited by Alaswad; Oct 12, 2014 at 10: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
    Dear,

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

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

Similar Threads

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

Posting Permissions