[CLOSED] FireEvent('selectionchange')

  1. #1

    [CLOSED] FireEvent('selectionchange')

    I figured I could try to get a simple answer without a sample while driving home on my 2 hour commute. If need be I can work up an example tonight.

    I have the following:
    ...
       <script type="text/javascript" >
       function selectRequestRow(selectionModel, records) {
       ...
       }
       </script>
    ...
    <ext:GridPanel ID="RequestGridPanel" runat="server" >
       ...
       <SelectionModel>
          <ext:RowSelectionModel runat="server" Mode="Single" AllowDeselect="true" />
       </SelectionModel>
       <Listeners>
          <SelectionChange Fn="selectRequestRow" />
       </Listeners>
    </ext:GridPanel>
    I would like to fire the SelectionChange event in a certain situation on the clientside. I thought all I had to do was:

      #{RequestGridPanel}.fireEvent('selectionchange');
    and the default parameters would automatically be passed.

    Second question:

    What is the difference between adding a listener for the SelectionChange event to a RowSelectionModel vs a GridPanel?
    Last edited by Daniil; Jan 15, 2013 at 4:10 AM. Reason: [CLOSED]
  2. #2
    Try this
    var grid = #{RequestGridPanel}.getSelectionModel();
    
    sm.fireEvent('selectionchange', sm, sm.getSelection());
    What is the difference between adding a listener for the SelectionChange event to a RowSelectionModel vs a GridPanel?
    SelectionChange event is fired by selection model only, grid just relies on this event from selection model (that event is refired by grid when selection model fires it)

Similar Threads

  1. Does MultiSelect has a SelectionChange event?
    By gmpd123 in forum 2.x Help
    Replies: 1
    Last Post: Jul 28, 2012, 8:10 PM
  2. [CLOSED] fireEvent while chaging value of textfield from code behind
    By FpNetWorth in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 05, 2011, 8:12 PM
  3. [CLOSED] Treegrid SelectionChange
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 07, 2010, 1:11 PM
  4. Replies: 0
    Last Post: Aug 04, 2009, 9:57 AM
  5. [CLOSED] ComboBox FireEvent on Coolite 0.8.2
    By macap in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Aug 03, 2009, 10:47 AM

Posting Permissions