Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
304
Fetching dynamic data collection
posted

We have a scenario where we will have to execute stored procedures and display the data on xamgrid. Some of the stored procedure return upto 50K records and therefore we would like to display them using virtual collection. However, we also have a scenario where the output of the stored procedures can change at times(may return new set of columns) based on the business requirement. We would not like to change the model everytime that happens hence we return a standard type of IEnumerable<Dictionary<string, object>>. Please let me know if its still feasible to use virtual collection under the given constraints.

Parents Reply Children
  • 6759
    Offline posted in reply to Anil

    You could check out this thread - as Stoimen has replied there the XamGrid does not support the filtering interfaces of the VC. The Stoimen's suggestion looks the best thing you could do to workeround this limitation.

    You need to hook up to grid's filtering events to know when the filters are changed. On such a change you need to get the new set of filters and provide them(in the ItemDataRequested event handler) to the call to your service - this way the service will return only filtered data.

    Another thing you should do is to inavalidate the VC's cache in order to make the vc to request all the elements in the page. You could do so by calling VC's Refresh() method.

    HTH,