Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Mar 2007
    Location
    CA
    Posts
    31
    Vote Rating
    0
    pjordan is on a distinguished road

      0  

    Default DataModel and DataStore equivalencies

    DataModel and DataStore equivalencies


    Hello, very new to EXT here.

    I was setting up some test last week to run yui-ext around the block. With Grid for example, I was able to grab the id (xmlDataModel) which I made meaningful:

    grid.on('rowclick', function(grid, rowIndex) {
    alert(grid.getDataModel().getRowId(rowIndex));
    });

    So, then I hear about EXT and 1.0. I have converted my testing rig to 1.0 but am at a loss when it comes to understanding DataStore (DataSource?)

    I'm thinking in the neighborhood of:

    grid.ds.getAt(rowIndex).ItemAt(id);

    Obviosuly, no joy :-)

    How would I achieve the equivalent of the above in 1.0 Alpha 2? Or, more generally, how would I access the data in any of the xml fields?


    Also, I was able to load a new xml data set into the grid at will, by doing (anywhere on the page):

    dm.load('url');

    How does one achieve this?

    Am I even close: ?

    ds.loadData('url');


    Lastly, anyone up for consulting? I've never had this much trouble finding paid help before in my life! Good Grief Charlie Brown....

    TIA

    Paul

  2. #2
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    maybe this will help:
    Code:
    var ds = grid.getDataSource(); // DataStore
    var cm = grid.getColumnModel(); // ColumnModel
    var r = ds.getAt(5); // 6-th Record from the DataStore
    var colName = cm.getDataIndex(7); // name of the 8-th column from the Record
    r.get(colName); // the record you want

  3. #3
    Ext User
    Join Date
    Mar 2007
    Location
    CA
    Posts
    31
    Vote Rating
    0
    pjordan is on a distinguished road

      0  

    Default


    Thanks, that worked like a charm.

    Correct me if I am wrong, there is no DataStore documentation. I am not complaining, just making sure I am not missing some source of docs for this.

    To get at a selected rows data:

    var s = sm.getSelected();
    var c = cm.getDataIndex(1);
    alert(s.get(c));

  4. #4
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    yep. right now jack's not working on documentation much. more on bugs and features.
    until then, we'll just have to dig into the source and rely on this forum for help.

    another place to hunt would be the examples folder in the ext-1.0-alpha2.zip file.
    there are already some great grid examples in there.

    haven't really fiddled with the RowSelectionModel / CellSelectionModel, but from your example you should probably be looking at the CellSelectionModel.

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    34
    Vote Rating
    0
    csmara is on a distinguished road

      0  

    Default


    Hi, I have a problem here maybe someone could help :d


    I've used @mystix code, I have a PropertyGrid(new for PropsGrid) and after I edited a cell I want to save it in database.

    The event function looks like this:

    function afterEdit(propsG) {


    var dso = propsG.getDataSource();
    var cmo = propsG.getColumnModel();

    var name = dso.getAt(0).get(cmo.getDataIndex(1));
    var d1 = dso.getAt(1).get(cmo.getDataIndex(1));
    var d2 = dso.getAt(2).get(cmo.getDataIndex(1));
    var d3 = dso.getAt(3).get(cmo.getDataIndex(1));
    var d4 = dso.getAt(4).get(cmo.getDataIndex(1));
    var d4 = dso.getAt(5).get(cmo.getDataIndex(1));




    // update new data
    update( name, d1, d2, d3, d4, d5 );
    }


    The problem is: if I modify the "name" -
    var name = dso.getAt(0).get(cmo.getDataIndex(1)); take the old value of name not the new value.

    Thanks,
    Cosmin.

Similar Threads

  1. a2: Datastore: remotesort fails if name is not equal mapping
    By Wolfgang in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 12 Mar 2007, 12:45 PM
  2. dataStore loadData and XML
    By ericd in forum Ext 1.x: Help & Discussion
    Replies: 36
    Last Post: 5 Mar 2007, 4:03 PM
  3. DataModel.query bug in FF
    By jdgrieco in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 29 Oct 2006, 5:02 PM
  4. this.dataModel has no properties
    By danvega in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 20 Oct 2006, 4:02 PM
  5. Reusing the DataModel
    By dmayer in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 12 Oct 2006, 9:32 AM

Thread Participants: 2