1. #1
    Ext User
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    0
    salih is on a distinguished road

      0  

    Default calculation on grid cell

    calculation on grid cell


    Hi Thanks a lot for the support i am getting from this forum.

    I hace a grid with say 5 colums(out of which 4 are neumerical) .I would like to calculate the running totoal of the 4 neumeric coulms in each row and to validate against a value.

    COuld anyone share a solution for this trouble
    A 1 2 3 4--------(10)
    B 2 5 6 8--------(21)

    Note:-Please provide example script if possible.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Dependent fields needs to be part of the core Ext Platform really. They could easily build in your technique.

  4. #4
    Ext User
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    0
    salih is on a distinguished road

      0  

    Default


    I mean there is a much easier way for this
    But I donno how to use that.From API it seems each will do the required.
    I would like to get a sample implementation



    each( Function fn, [Object scope] ) : void Calls the specified function for each of the Records in the cache.
    Calls the specified function for each of the Records in the cache. Parameters:
    • fn : Function The function to call. The Record is passed as the first parameter. Returning false aborts and exits the iteration.
    • scope : Object (optional) The scope (this reference) in which the function is executed. Defaults to the current Record in the iteration.
    Returns:

    Store
    My store is store = new Ext.ux.data.PagingJsonStore({
    fields : fields,
    url:'loadxxxxxx.do',
    root: 'result'

    });
    I am retriving all the records from the store
    var records = [].concat(store.allData.items);
    Now i would like to iterate over the records for a validation.
    But my colums in the grid are dynamic .
    I would like to know by any means ,could we retrive the column defenition from the store or record .
    gor eg: if i gave any index is it possible to get the colum name in that location.

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    A store doesn't know anything about columns, only about records and fields.

    Do you mean fields instead of columns? A store has a 'fields' property that holds a MixedCollection.

    ps. store.allData is also a MixedCollection, so it also has an each() method.

  6. #6
    Ext User
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    0
    salih is on a distinguished road

      0  

    Default


    yup ...dynamic fields...
    If you dont mind could you please share a sample example code that takes multiple inputs??

Similar Threads

  1. Replies: 2
    Last Post: 29 Jul 2010, 9:09 AM
  2. Grid Summary Group custom calculation
    By Johny Joe in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 7 Sep 2009, 8:53 PM
  3. ComboBox with autoListWidth calculation
    By devnull in forum Ext 1.x: User Extensions and Plugins
    Replies: 0
    Last Post: 12 Nov 2007, 3:27 PM
  4. A Calculation form question
    By ashelleydesign in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 19 Sep 2007, 12:16 AM
  5. Grid cell auto update on inline dit or another cell
    By seymores in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 24 Apr 2007, 9:18 AM

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar