Populating Grid
Hello
I have a question about populating an activewidget grid from data recevied from a websphere. I appologize in advance for I'm sure I'm doing something dumb but I'm rather new at this so please bear with me.
I created a websphere in vs.net 2003 which has a method called GetData which looks like this
public System.Data.DataSet GetData(string strQryName, string strWhere)
....code......
oAdapter.Fill(ds);
oleDbConnection1.Close();
return ds;
I have tested this and I know that it works the way I want it to. I wish to call this method via javascript and use the results to populate a grid.
Here's what I have so far:
<script language = "javascript">
var data = new Active.XML.Table;
var iCallID = 0;
function init()
{
service.useService("/DataFeeder.asmx?WSDL", "datafeed");
iCallID = service.datafeed.callService(myResults, "GetData", "qryClient", null);
}
function myResults(result)
{
if(result.error)
{
alert(result.errorDetail.string);
}
else
{
alert("Woot");
data.XML = result.value;
var obj = new Active.Controls.Grid;
obj.setDataModel(data);
document.write(obj);
}
}
</script>
Anyway it doesn't work. Could someone please tell me what I'm doing incorrectly, perhaps point me to a code sample that would be helpful. I tried a couple of different approaches using some of the example code in the \samples\grid folder and didn't have any luck there either.
Thank for your time
I have a question about populating an activewidget grid from data recevied from a websphere. I appologize in advance for I'm sure I'm doing something dumb but I'm rather new at this so please bear with me.
I created a websphere in vs.net 2003 which has a method called GetData which looks like this
public System.Data.DataSet GetData(string strQryName, string strWhere)
....code......
oAdapter.Fill(ds);
oleDbConnection1.Close();
return ds;
I have tested this and I know that it works the way I want it to. I wish to call this method via javascript and use the results to populate a grid.
Here's what I have so far:
<script language = "javascript">
var data = new Active.XML.Table;
var iCallID = 0;
function init()
{
service.useService("/DataFeeder.asmx?WSDL", "datafeed");
iCallID = service.datafeed.callService(myResults, "GetData", "qryClient", null);
}
function myResults(result)
{
if(result.error)
{
alert(result.errorDetail.string);
}
else
{
alert("Woot");
data.XML = result.value;
var obj = new Active.Controls.Grid;
obj.setDataModel(data);
document.write(obj);
}
}
</script>
Anyway it doesn't work. Could someone please tell me what I'm doing incorrectly, perhaps point me to a code sample that would be helpful. I tried a couple of different approaches using some of the example code in the \samples\grid folder and didn't have any luck there either.
Thank for your time
Alex
October 17,