:: Forum >>

Having Problem posting data from a service

Hi,
I use
var table = new AW.XML.Table;
table.setURL("webservice.asmx/getDataSet");
table.setParameter("name", "value");
table.setRequestMethod("POST");
table.setRows("//NewDataSet/*");
table.request();

Grid populates fine, but for fields with dbNull, aw skips the cell, resulting in data shifting to the left.
Hence, my data for each row do not lineup under the correct column header.
Any help?

I am also new, and I don't know how I get informed if someone posts a response! So, wish me luck.
Ghalib
Thursday, December 13, 2007
>> for fields with dbNull, aw skips the cell

That happen when the element is missing from the XML. In this case you should explicitly specify XPath for each column, for example,

table.setColumns(["@id", "product", "price", "price/@ccy", "qty"]);

/aw.xml.table/columns.html

There is also a sample code for this in
/examples/grid data - xml data islands/xpath.htm

>> my data for each row do not lineup

If you are using DOCTYPE which triggers 'standards-compliant' mode and you added borders to the grid cell - you have to compensate the cell size by reducing the cell padding:

#myGrid .aw-grid-row {border-bottom: 1px solid threedlightshadow;}
#myGrid .aw-grid-cell {border-right: 1px solid threedlightshadow;}

/* box model fix for strict doctypes, safari */
.aw-strict #myGrid .aw-grid-cell {padding-right: 3px;}
.aw-strict #myGrid .aw-grid-row {padding-bottom: 3px;}


Alex (ActiveWidgets)
Thursday, December 13, 2007
Hi Alex,
By "my data for each row do not lineup", I mean is that, as a result of missing cells, since the cell is missing the value,the cell in the next column is shifted to the left. Say, for example, my dataType (column) is date, yet I see dates in some rows and text in other rows under the same column. They all should have been dates.

I also do not understand your explaination. Are you saying that if my data for some fields in a record in my database is blank (dbNull), then I cannot use webServices and I should use a different method?
Are you saying I should not use the following:
table.setURL("webservice.asmx/getDataSet");
thanks
ghalib
Thursday, December 13, 2007

This topic is archived.


Back to support forum

Forum search