Pagination appearing as many number of times as many times i

here i’m loading a xml file which is updated from the database each time when add,edit and delete operation is performed.everything is coming properly but the paging is appearing more number of times.here is the code.“doInitGrid() is method of grid creation i’m using please give some suggestions …









<%@ taglib prefix=“c” uri=“http://java.sun.com/jstl/core” %>

<%@ taglib prefix=“fmt” uri=“http://java.sun.com/jstl/fmt” %>



























.mouseOut {

background: #7A8AFF;

color: #FFFAFA;

}



.mouseOver {

background: #FFFAFA;

color: #000000;

}





Auto-Completion using Asynchronous JavaScript and XML (AJAX)

























Employee Name:

<input type=“text”

size=“20”

id=“complete-field”

                name=“id”

onkeyup=“doCompletion();”>





 






<table id=“names”

bgcolor="#FFFAFA"

border=“1”

bordercolor=“black”

cellspacing=“0”

cellpadding=“0”/>



add&nbsp&nbspadd


















Instead of full grid reinitialization ( through calling doInitGrid after each operation ) you can just call


mygrid.clearAll();
mygrid.loadXML("/grid.xml");

In such case you will reload data only , without changing any other aspects of grid.

If you still prefer to use existing code you can fix the issue with paging code by adding one more line which will clear paging area before usage.

document.getElementById(“pagingArea”).innerHTML="";
mygrid.enablePaging(true,5,3,“pagingArea”,true,“recinfoArea”);