Results 1 to 2 of 2

Thread: Adding a row to spry XMLDataSet

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member Newbie
    Join Date
    May 2011

    Default Adding a row to spry XMLDataSet

    I have a Spry.Data.XMLDataSet I want a row to be added in the 1st location and also get highlighted when it appears in my table.

    var ds1 = new Spry.Data.XMLDataSet("/xml/data.xml", "rows/row");
    var pv1 = new Spry.Data.PagedView( ds1 ,{ pageSize: 10 , forceFullPages:true, useZeroBasedIndexes:true});
    var pvInfo = pv1.getPagingInfo();

    Here is the data.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <row id="a">
    <row id="b">

    This is what I am doing after a button click, But it does not seem to work, can somebody help?

    function addRow()
    var newRow = new Array();
    var nextID = ds1.getRowCount();
    newRow['ds_RowID'] = nextID;
    newRow['id'] = "c";
    newRow['name'] = "CJ";
    newRow['desc'] = "windows_CJ";

    ds1.dataHash[newRow['ds_RowID']] = newRow; newRow);


    After updateRegion(ds1) my ds1.getRowCount() shows that there is a increment in the size, but it's not getting reflected in my table (spry Region) please help somebody
    Last edited by abhisheksimion; 05-03-2011 at 09:45 PM. Reason: improved formatting

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts