Returning Arraylist of custom class objects from W

Results 1 to 2 of 2

Thread: Returning Arraylist of custom class objects from W

  1. #1
    Join Date
    Dec 1969

    Default Returning Arraylist of custom class objects from W

    Hi there,<BR>I am having problem in displaying data in data grid. Here is detail.<BR>I&#039;ve a web service that returns an arraylist of my class objects and I want to display it in datagrid Here is the code snippet<BR><BR>BAL cb = new BAL(); //Web service object instantiation<BR>object[] obj = cb.GetJobs(job); //Service returns me object[]<BR>ArrayList aJobList = new ArrayList(obj); <BR>dgPostHistory.DataSource = aJobList; //Assign arraylist to DS<BR>dgPostHistory.DataBind();<BR><BR>I am getting this exception <BR>"A field or property with the name &#039;TrackingNo&#039; was not found on the selected datasource."<BR><BR>I saw in the proxy file that my class (Generated by VS on application side) is there but it doesnt have any public properties that I&#039;ve defined in my class. I am using my class in my business and data access layer.<BR>If I call Data Access method that returns ArrayList directly, my application works fine and all the data is displayed in datagrid but when I call web service method that calls Data Access method, I get the above error.<BR><BR>Does anybody have solution for this.<BR><BR>Thanks<BR> <BR> <BR>Zash

  2. #2

    Default RE: Returning Arraylist of custom class objects fr

    Have you check the type of the objects that are supposed to be you jobs?<BR>How about casting.<BR><BR>Are you working from documentation about araay lists of custom classes? Can you link to that doc?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts