I have added a RadGrid to a control designer attached to a User Control Widget, based on the standard examples for RadGrid client-side programatic databinding and Sitefinity 4 control designers. Everything is working as I expected except that the control designer's script is populating the control parameter values after the RadGrid's OnDataBinding client side event.
That's a problem since the RadGrid needs the controls parameters to pass them to the web service datasource.
The control designer's script to populate control properties
param = data.CategoryCode;
) param =
happens before the RadGrid databinding event that fills in the value in #uiCategoryCode
methodArguments = args.get_methodArguments();
myMethodArguments.Category = jQuery(
The problem occurs, because you are binding the grid declaratively. When binding the grid this way, it calls the webservice on page load or later, but after the control designer's refreshUI method. What you can do is manually bind the grid in client-side code in the refreshUI method itself. That's what we are doing in the built-in control designers, too.
You can find more information about how to do this here: http://www.telerik.com/help/aspnet-ajax/grid-live-data-from-web-service.html (just do it once and not after a predefined interval with live data).