[CLOSED] GridPanel: modify cell-content from listener (script)

  1. #1

    [CLOSED] GridPanel: modify cell-content from listener (script)



    Hi everybody,

    is there a way to modify the content of a cell (through a listener) when an other cell in the same row has been modified?

    For example:

    I have 3 columns: 'unit price', 'amount' and 'sum'.

    If the user edits the data in the 'amount' column, I have to set the 'sum' in the same row to 'unit price' * 'amount'.

    I've tried this code, but I don't know how to set the 'sum' or 'sumText' value:

    ...
    <ext:Column DataIndex="amount" Header="amount">
        <Editor>
            <ext:TextField ID="amountText" runat="server" >
                <Listeners>
                    <Change Handler="????" />
                </Listeners>
            </ext:TextField>
        </Editor>
    </ext:Column>
    
    <ext:Column DataIndex="sum" Header="sum">
        <Editor>
            <ext:TextField ID="sumText" runat="server" />
        </Editor>
    </ext:Column>
    ...
    Please help...

    Thanks,
    Andy
  2. #2

    RE: [CLOSED] GridPanel: modify cell-content from listener (script)

    Hi Andy,

    Please see the following topic:
    http://forums.ext.net/showthread.php?threadid=7990-4-1.aspx


    If you need Listener instead AjaxEvent then replace AjaxEvent by
    ** * * * * *<Listeners>
    ** * * * * * * *<AfterEdit Handler="e.record.set('sum', 1*e.record.data.x + e.record.data.y)" />
    ** * * * * *</Listeners>





  3. #3

    RE: [CLOSED] GridPanel: modify cell-content from listener (script)

    Hi Vladimir,

    thanks for your reply.

    That helps me solving that problem.


    Best regards,
    Andy

Similar Threads

  1. [CLOSED] Center GridPanel cell column content
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 04, 2012, 10:24 AM
  2. Replies: 12
    Last Post: Jun 05, 2011, 8:08 PM
  3. QTip on cell not having any content
    By mansi752 in forum 1.x Help
    Replies: 5
    Last Post: Dec 21, 2010, 9:40 AM
  4. [CLOSED] AjaxEvent "after" script / listener
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Nov 10, 2010, 3:31 PM
  5. Modify font-size in GridPanel
    By John_Writers in forum 1.x Help
    Replies: 0
    Last Post: Apr 28, 2010, 5:26 AM

Posting Permissions