Notification when refresh returns no results?

Topics: jQuery
Oct 31, 2011 at 6:45 PM

Hi,

Current RIA/JS samples are binding to the array change event, such as:

            // Bind arrayChange event to render ui.
            $([products]).bind(
                "arrayChange",
                function () { $("#products").empty().append($.render($.template("#product"), products)); }
            );

            // Bind array with data source and refresh.
            $([products]).dataSource({
                serviceUrl: "Sample-Services-InventoryService.svc",
                queryName: "GetProducts"
            }).refresh();

The arrayChange is not raised when no results are returned.

How can we detect that no results were returned?

Thanks