I am trying to populate a grid, based on sproc results, with parameters passed, on load. When I use the results of the sproc as the binding property, I end up with the api being called twice. Once with the parameters, and once with null parameters, and I end up with all data, not just the data I want:
Note that the first call is correct.
Binding to the grid looks like this (second one is the count):
Page load event looks like this:
And like I said above, the displayed grid results are the unfiltered results of the second call, not the filtered results that I want from the first call. Paging in this case, works fine, as one would expect.
I tried binding to the claims property, which is set in the load event (above), like this:
The result is that I can see the first 10 records, but there is no paging. I have tried binding the count to ${claims.count} and ${claims}.Count();
but these don't work.
For some reason the count property is returned by the API when no parameters are passed:
But no count property is returned when the parameters are passed:
Why would that be the case?
Binding the second way, I still get two API calls, the first with parameters and the second without, but at least doing it that way, I do get the correct results in the grid, less the needed paging.
How can I get paging to work, and why is the API being called twice?
The other problem I have is that I am trying to bind the pageTitle to the ${header} page property, which is set on page load (above) to null, and then is updated after the API call.
When I do this, no data displays, because the page throws an exception:
If I move the statement that assigns the ${header} property to here, I get a different error:
Why?