[CLOSED] Mask on GridPanel RowClick?

  1. #1

    [CLOSED] Mask on GridPanel RowClick?

    Hey,
    im not entirely sure how Masks work, but I am wondering if I can get a Mask up when I do a RowClick on a GridPanel somehow?

    So in a GridPanel that has a RowClick handler like this:

    <Listeners>
         <RowClick Handler="Ext.net.DirectMethods.SetCustomer();"  />
    </Listeners>
    Can I somehow mask something else (another UserControl) while SetCustomer is executing?
    Last edited by Daniil; Apr 06, 2011 at 7:45 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use a config object.

    Example
    Ext.net.DirectMethods.SetCustomer({
        eventMask : { 
            showMask: true, 
            target: 'customtarget',
            customTarget: 'GridPanel1.el'
        }
    });
  3. #3
    Hmm, that didnt seem to work.

    Can you see what I am missing?


    <ext:GridPanel
                            ID="GridPanel2" 
                            runat="server" 
                            StoreID="Store_AvailableCustomers"
                            StripeRows="true"
                            Header="true"
                            Title="Kundlista">
                                <LoadMask ShowMask="false" />
                                <SelectionModel>
                                    <ext:RowSelectionModel 
                                        ID="SelectedRowModel1" 
                                        runat="server" 
                                        SingleSelect="true">
                                    </ext:RowSelectionModel>
                                </SelectionModel>     
                                <ColumnModel ID="ColumnModel2" runat="server" >
                                    <Columns>
                                        <ext:Column ColumnID="CustomerId" Header="ID" DataIndex="CustomerId" Hidden="true" />
                                        <ext:Column DataIndex="FirstName" Header="Förnamn" />
                                        <ext:Column DataIndex="LastName" Header="Efternamn"  />
                                        <ext:Column DataIndex="PhoneNbr" Header="Telefonnr"  />
                                    </Columns>
                                </ColumnModel>
                                <Listeners>
                                    <RowClick Handler="Ext.net.DirectMethods.SetCustomer({
                                        eventMask : { 
                                                showMask: true, 
                                                target: 'customtarget',
                                                customTarget: 'GridPanel2.el'  
                                                }});"  
                                          />
                                </Listeners>
                        </ext:GridPanel>
  4. #4
    Please remove apostrophes in customTarget.
    customTarget : GridPanel2.el
    P.S. I placed them previously by a mistake. Apologize for the inconvenience.
  5. #5
    Thank you, that worked better!

    Which of course leaves me with the next question =)

    Instead of masking the same GridPanel, I want to mask a gridpanel in another UserControl (or the UserControl itself).

    So the same code as above applies, but instead I want to mask a UserControl that is places on the same Page, but in another Container (using Master Page and ContentHolders) like this:

    <asp:Content ID="Content2" ContentPlaceHolderID="CPH_center" runat="server">
        
        <CP:Customer ID="customer" runat="server" _IsCreateMode="false" ViewStateMode="Enabled" Title="Kund" />   
       
    </asp:Content>
    
    <asp:Content ID="Content3" ContentPlaceHolderID="CPH_west" runat="server">
          // in here somewhere is that GridPanel that Im clicking
    </asp:Content>
    if I try to set the customTarget I get undefined error:
                                <Listeners>
                                    <RowClick Handler="Ext.net.DirectMethods.SetCustomer({
                                        eventMask : { 
                                                showMask: true, 
                                                target: 'customtarget',
                                                customTarget: customer.el
                                                }});"  
                                          />
                                </Listeners>
    gives "Uncaught ReferenceError: CPH_center_customer is not defined"

    and
                                <Listeners>
                                    <RowClick Handler="Ext.net.DirectMethods.SetCustomer({
                                        eventMask : { 
                                                showMask: true, 
                                                target: 'customtarget',
                                                customTarget: #{customer}.el
                                                }});"  
                                          />
                                </Listeners>
    gives "Uncaught ReferenceError: customer is not defined".

    As you can see I havent really got it with the referencing just yet.

    Thanks!
  6. #6
    Well, there is no user control on client side.

    What's the content of the user control? You should use an element (Ext.Element) of client side widget - Panel1.el, GridPanel1.el, Ext.get("divId"), etc.
  7. #7
    Ah, I keep forgetting that!

    Thanks, its solved =)

Similar Threads

  1. [CLOSED] GridPanel RowClick Method Signature
    By jwf in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 18, 2011, 7:32 PM
  2. Replies: 0
    Last Post: Apr 06, 2011, 1:06 PM
  3. Replies: 1
    Last Post: Mar 28, 2011, 4:29 PM
  4. Replies: 2
    Last Post: Jul 20, 2010, 3:00 PM
  5. How to prevent RowClick if row already selected?
    By dbassett74 in forum 1.x Help
    Replies: 1
    Last Post: May 28, 2009, 7:29 PM

Tags for this Thread

Posting Permissions