M
Mark Irvine
Hi,
I am using a webservice to return a dataset holding three tables to a client
app running on Pocket PC2003. I'm using an asynchronous webservice so that
I can do other things while waiting for the data. When the call completes,
I try to bind the datset to the datagrid, however this locks the app - no
error messages it just locks up. The code is as below:
private void frmMain_Load(object sender, System.EventArgs e)
{
this.Text += " : " + this.GetEngineerName().ToLower();
wsHeatSchedule.Schedule wsSchedule = new
Heat.Mobile.wsHeatSchedule.Schedule();
AsyncCallback acSchedule = new AsyncCallback(ScheduleCallback);
wsSchedule.BeginGetSchedule(7, "23/12/2003", acSchedule, wsSchedule);
this.cboScheduledItems.DataSource = new ScheduledItem[] {new
ScheduledItem("First", "1")};
ListViewItem lviOne = new ListViewItem("First");
lviOne.SubItems.Add("One");
this.lvTest.Columns.Add("Title", -2, HorizontalAlignment.Left);
this.lvTest.Items.Add(lviOne);
this.GetFocus();
}
private void ScheduleCallback(IAsyncResult iarSchedule)
{
MessageBox.Show("Here1");
wsHeatSchedule.Schedule wsScheduleCallbck =
(wsHeatSchedule.Schedule)iarSchedule.AsyncState;
MessageBox.Show("Here2");
ds = wsScheduleCallbck.EndGetSchedule(iarSchedule);
MessageBox.Show("Here3");
dgResponseJobs.Visible = false;
MessageBox.Show(dgResponseJobs.DataSource.ToString());
}
Can anyone suggest how I can bind the data to the datagrid?
Mark
I am using a webservice to return a dataset holding three tables to a client
app running on Pocket PC2003. I'm using an asynchronous webservice so that
I can do other things while waiting for the data. When the call completes,
I try to bind the datset to the datagrid, however this locks the app - no
error messages it just locks up. The code is as below:
private void frmMain_Load(object sender, System.EventArgs e)
{
this.Text += " : " + this.GetEngineerName().ToLower();
wsHeatSchedule.Schedule wsSchedule = new
Heat.Mobile.wsHeatSchedule.Schedule();
AsyncCallback acSchedule = new AsyncCallback(ScheduleCallback);
wsSchedule.BeginGetSchedule(7, "23/12/2003", acSchedule, wsSchedule);
this.cboScheduledItems.DataSource = new ScheduledItem[] {new
ScheduledItem("First", "1")};
ListViewItem lviOne = new ListViewItem("First");
lviOne.SubItems.Add("One");
this.lvTest.Columns.Add("Title", -2, HorizontalAlignment.Left);
this.lvTest.Items.Add(lviOne);
this.GetFocus();
}
private void ScheduleCallback(IAsyncResult iarSchedule)
{
MessageBox.Show("Here1");
wsHeatSchedule.Schedule wsScheduleCallbck =
(wsHeatSchedule.Schedule)iarSchedule.AsyncState;
MessageBox.Show("Here2");
ds = wsScheduleCallbck.EndGetSchedule(iarSchedule);
MessageBox.Show("Here3");
dgResponseJobs.Visible = false;
MessageBox.Show(dgResponseJobs.DataSource.ToString());
}
Can anyone suggest how I can bind the data to the datagrid?
Mark