3.2.0

Accessing XML (string) Data

Hi,

Thanks a lot for this Grid, i try to implement it has a custom control in C#.
I allready have all data access component on my server and i have a mecanism that translate data and columns. All those information are send to the AW using a Webservice :

<GRID>
<COLUMNS_DEFINITION>....</COLUMNS_DEFINITION>
<ROWS_DATA>....<ROWS_DATA>
</GRID>


I would like to manipule those data, but i can't figure out how to access those information has XML DOMDocument on client script. I have try :

(data is a Active.XML.Table)
var .... data.getXML();
var .... = obj.getResponseXML();

I' m sorry to ask a so simple quetion but i don't use to work with client script, especialy when those scripts are so much OO !

Thanks for your help, and if someone is interested this is the C# example of the C# on the server :

DHTMLGrid DBGrid = new DHTMLGrid() ;
DBGrid.ID = "myid";
DBGrid.Data.URL = "........asmx/ExecuteModeler" ;
DBGrid.Data.addParameter("pUserId","2","integer");
DBGrid.Data.addParameter("pModelerId","89","integer");
DBGrid.Data.addParameter("pCultureCode","0x0000","string");
DBGrid.Data.Method = "POST" ;
DBGrid.Data.ColumnsList = "'V89_2170'";
DBGrid.Data.RowXpath = "ROWS_DATA/ROW_DATA";

***AND I WOULD LIKE TO IMLEMENT A****
DBGrid.Data.ColumnsXPath = "COLUMNS_DEFINITION/COLUMN_DEFINITION"

DBGrid.Grid.isMultipleSelection = true ;
this.Page.Controls.Add(DBGrid);

And if i can help someone back.....

Bertrand
June 2,
data.getXML() should work but only after you get a response back from the server. You have to overload the response method:
// save existing method
var defaultResponse = data.response;

// create yours
data.response = function(xml){
  // call the default 
  defaultResponse.call(this, xml);
  // do what you want with XML
  xml.selectNodes(...);
}
Alex (ActiveWidgets)
June 3,
Thanks a lot for this answer, i found that data was using GET method by default so i set it to POST.
And now it works fine !






June 4,

This topic is archived.

See also:


Back to support forum