Helder.Almeida

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • in reply to: Method For Adding SubGrid (aka SubGrid in Array Data) #82326
    Helder.Almeida
    Participant

    Yes, would be nice to add all the SubGrid data When we create the initial Grid aswell.

    in reply to: Page feature working with Array Data #82322
    Helder.Almeida
    Participant

    I managed to do something to work around this yesterday.. forgot to come check the forums and just went for it.

    After the Grid is built we instert the first 10 rows and initialize and update a few support variables:

    var i=0;
    var count=0;
    var temp;
    var currentRows=0;
    <% int j;
    for(j=0;j
    temp=;
    if (temp>=i && temp<count+10)
    {
    i=i+1;

    var mydata = {
    autoId:”,
    day:”,
    autosPrevi:”,
    autosContract:”,
    autosTrabMais:”,
    autosTrabMenos:”,
    autosRevisao:”,
    juros:”,
    multas:”
    }
    jQuery(“#list4”).addRowData(i,mydata);
    currentRows=currentRows+1;

    }

    $(“#testePag”).append(“1”);
    count=count+10;

    Then I add 2 buttons and a ‘currentPage / Total Pages’ thingy:

    <input type="BUTTON" id="previous10" value="<
    0)
    x=((dtAutos.Rows.Count – 2) / 10) + 1;
    else
    x=(dtAutos.Rows.Count – 2 / 10); %>
    /
    >” />

    And then give javasript those buttons:

    $(“#previous10”).click(function () {

    //Apagar files
    for(var z=i-currentRows;z<=i;z++)
    {
    jQuery(“#list4”).delRowData(z);
    }

    i=i-currentRows;
    i=i-10;
    currentRows=0;
    count=count-20;

    <%
    for(j=0;j
    temp=;
    if (temp>=i && temp<count+10)
    {
    i=i+1;

    var mydata = {
    day:”,
    autosPrevi:”,
    autosContract:”,
    autosTrabMais:”,
    autosTrabMenos:”,
    autosRevisao:”,
    juros:”,
    multas:”
    }
    jQuery(“#list4”).addRowData(i,mydata);
    }

    count=count+10;
    document.getElementById(“testePag”).innerHTML=count/10;
    });

    $(“#next10”).click(function () {

    //Apagar files
    for(var z=i-10;z<i;z++)
    {
    jQuery(“#list4”).delRowData(z);
    }
    currentRows=0;

    <%
    for(j=0;j
    temp=;
    if (temp>=i && temp<count+10)
    {
    i=i+1;

    var mydata = {
    day:”,
    autosPrevi:”,
    autosContract:”,
    autosTrabMais:”,
    autosTrabMenos:”,
    autosRevisao:”,
    juros:”,
    multas:”
    }
    jQuery(“#list4”).addRowData(i,mydata);
    currentRows=currentRows+1;
    }

    count=count+10;
    document.getElementById(“testePag”).innerHTML=count/10;

    });

    Easy stuff 😉

Viewing 2 replies - 1 through 2 (of 2 total)

Stay connected with us in your favorite flavor!