3.0 beta 2

Populate existing grid with XML

I have an extended grid. It works great. It does what it needs to do.

But, one of the functions I'm working on requires that I do a search of my database and then populate that existing grid with the XML data.

Instead of populating the existing grid, it's drawing a grid below and trying to populate that one. I have two grids on my screen.

Help?
Chris
Chris
September 10,
Here is the code that I'm using to repopulate the grid with XML data:

var table = new AW.XML.Table;
table.setURL('action.asp?action=findInvoice&fldInvNumToSearchFor='+document.getElementById("fldInvNumToSearchFor").value+'&registerNumber=<%=session("gregisterNum")%>');
table.request();
gridInvoice.setCellModel(table);
gridInvoice.refresh();


The XML is getting returned properly no problem. I can view the XML and it looks like it's supposed to. It's just that the grid is never getting populated.

Is this the proper way to repopulate a grid with XML data? Basically, the grid gets blanked out and nothing in the grid works at that point.

Thanks,
Chris
Chris
September 10,
I think that you also need to populate the number of rows returned.
Try this:
gridInvoice.setCellModel(table);
gridInvoice.setRowCount(table.getCount());
gridInvoice.refresh();

HTH
Carlos
September 11,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.