I'm running clientside Callbacks for performance reasons and I would like to Add new elements to the display in the form of HTML/JS and load new Telerik Web Controls as certain selections are processed. The code below samples what I would like to do.
public void RaiseCallbackEvent(String eventArgument)
{
TextWriter text = new StringWriter();
HtmlTextWriter html = new HtmlTextWriter(text);
RadComboBox comboBox = new RadComboBox();
comboBox.ID = "test";
comboBox.RenderControl(html);
html.Flush();
callBackReturn = text.ToString();
}
public String GetCallbackResult()
{
return callBackReturn;
}
The Error i Receive is on comboBox.RenderControl(html) line : Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
Can you dynamically create new Telerik controls using ClientSide Callbacks? Will this be something that will be supported in the future?
Thanks,
Matt
public void RaiseCallbackEvent(String eventArgument)
{
TextWriter text = new StringWriter();
HtmlTextWriter html = new HtmlTextWriter(text);
RadComboBox comboBox = new RadComboBox();
comboBox.ID = "test";
comboBox.RenderControl(html);
html.Flush();
callBackReturn = text.ToString();
}
public String GetCallbackResult()
{
return callBackReturn;
}
The Error i Receive is on comboBox.RenderControl(html) line : Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
Can you dynamically create new Telerik controls using ClientSide Callbacks? Will this be something that will be supported in the future?
Thanks,
Matt