Hi all, first warning: I am new to all this so I could be approaching this completely wrong. Your patience is appreciated.
I am developing a form that initiates a search and displays results in a GridView. The problem is my source of data is a weird api that operates like so: 1. Initiate search 2. Poll api until the search finishes 3. retrieve final results in XML string. This quirkiness prevents me from using a traditional ObjectDataSource or the like.
I have developed a custom class that handles creation, polling, and manipulation of the results into a DataSet object. I understand this is the best way to have all the data available and persistant so I can create a rich user experience with the GridView without having to poll the API again. What I want to happen on my results page is an empty GridView to be present while the custom API Class is initiating/polling the API. When it finishes, I want to update the GridView with the final results.
I have the gridview created in my results page empty. Then with a button click I create a new instance of my custom API class, and poll until the search is finished, then retrieve the dataset and bind manually. This works and displays the first page of my results. The problem is sorting doesn't work and even with instructions from ( http://community.strongcoders.com/content/CSGridViewSortingPaging.aspx ) the paging always returns like its working with an empty DataSet and doesn't seem to fire the OnPageChanging event. I'm wondering if its a scope issue and my Object isn't persisting.
Next I tried to use an ObjectDataSource tied to my API Object and bind Update() to a MyObject.GetResults() that returns the DataSet for my custom class. This forces an instantiation of my API class, where the inital DataSet is blank (and hence the GridView). Then I run the subs that fill in the dataset, but I can't figure out how to force the GridView to reload the DataSet.
Sorry if this is vague or useless without code. I'm still figuring out this whole data layers stuff in ASP.NET. Thank you in advance.