New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

This partial class defines RadClientDataSource control - a flexible and extensible server-side component for retrieving and providing data on the client under various forms and from different source such web and rest service, page method, other datasource controls and other means

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(Html5Data))]
[ClientScriptResource("Telerik.Web.UI.RadClientDataSource", "Telerik.Web.UI.ClientDataSource.RadClientDataSourceScripts.js")]
[ToolboxBitmap(typeof(RadClientDataSource), "Toolbox.Icons.ClientDataSource.png")]
[TelerikToolboxCategory("Data")]
public class RadClientDataSource : Control, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IScriptControl, IControl, IControlResolver, IPostBackDataHandler, ICallbackEventHandler

Inheritance: objectControlRadClientDataSource

Derived Classes: WebServiceClientDataSource

Implements: ICallbackEventHandlerIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorIParserAccessorIPostBackDataHandlerIScriptControlIUrlResolutionService...

Inherited Members Control.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnLoad(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.CreateChildControls()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.EnableThemingControl.IsChildControlStateClearedControl.SkinIDControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadClientDataSource()

Properties

Gets a collection of aggregates expressions for RadClientDataSource

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual ClientDataSourceAggregatesCollection Aggregates { get; }

Gets or sets a value indicating whether batch operations in the RadClientDataSource are enabled

        The default is false.
C#
public virtual bool AllowBatchOperations { get; set; }

Gets or sets a value indicating whether the paging in RadClientDataSource is enabled

        The default is false.
C#
public virtual bool AllowPaging { get; set; }

Gets or sets a value indicating whether the RadClientDataSource would automatically save any changed data items by calling the sync method. By default changes are not automatically saved.

        The default is false.
C#
public virtual bool AutoSync { get; set; }

Gets a reference to ClientDataSourceClientEvents class.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public ClientDataSourceClientEvents ClientEvents { get; }

Gets or sets a value indicating the index of the currente page

C#
[Bindable(true)]
[Browsable(false)]
public int CurrentPageIndex { get; set; }
Property Value:

The index of the current page.

Contains settings about the different types of data sources used in RadClientDataSource.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual ClientDataSourceSettings DataSource { get; }

Gets or sets value indicating whether server-side aggregates are enabled

C#
public virtual bool EnableServerAggregates { get; set; }

Gets or sets value indicating whether server-side filtering is enabled

C#
public virtual bool EnableServerFiltering { get; set; }

Gets or sets value indicating whether server-side grouping is enabled

C#
public virtual bool EnableServerGrouping { get; set; }

Gets or sets value indicating whether server-side paging is enabled

C#
public virtual bool EnableServerPaging { get; set; }

Gets or sets value indicating whether server-side sorting is enabled

C#
public virtual bool EnableServerSorting { get; set; }

Gets a collection of filter expressions for RadClientDataSource

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual ClientDataSourceFilterExpression FilterExpression { get; }

Gets a collection of group expressions for RadClientDataSource

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual ClientDataSourceGroupExpressionCollection GroupExpressions { get; }

Gets or sets the maximum number of items that would appear on a page. Default value is 10.

C#
public virtual int PageSize { get; set; }

Gets or sets the value, indicating whether to register with the ScriptManager control on the page.

C#
public virtual bool RegisterWithScriptManager { get; set; }

Implements: IControl.RegisterWithScriptManager

If RegisterWithScriptManager is set to false the control can be rendered on the page using Web Services or normal callback requests/page methods.

Contains settings about the schema and model of the data used in RadClientDataSource.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual ClientDataSourceSchema Schema { get; }

Gets a collection of sort expressions for RadClientDataSource

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual ClientDataSourceSortExpressionCollection SortExpressions { get; }

Methods

C#
protected void DescribeEvent(IScriptDescriptor descriptor, string eventName, string handlerName)
Parameters:descriptorIScriptDescriptoreventNamestringhandlerNamestring
C#
public string GetCallbackResult()
Returns:

string

Implements: ICallbackEventHandler.GetCallbackResult()

Gets a collection of script descriptors that represent ECMAScript (JavaScript) client components.

C#
public IEnumerable<ScriptDescriptor> GetScriptDescriptors()
Returns:

IEnumerable<ScriptDescriptor>

An IEnumerable collection of ScriptDescriptor objects.

Implements: IScriptControl.GetScriptDescriptors()

Gets a collection of ScriptReference objects that define script resources that the control requires.

C#
public IEnumerable<ScriptReference> GetScriptReferences()
Returns:

IEnumerable<ScriptReference>

An IEnumerable collection of ScriptReference objects.

Implements: IScriptControl.GetScriptReferences()

Loads the client state data

C#
protected virtual bool LoadClientState(Dictionary<string, object> clientState)
Parameters:clientStateDictionary<string, object>Returns:

bool

Executed when post data is loaded from the request

C#
protected virtual bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Parameters:postDataKeystringpostCollectionNameValueCollectionReturns:

bool

C#
protected override void LoadViewState(object savedState)
Parameters:savedStateobject

Overrides: Control.LoadViewState(object)

C#
protected override void OnInit(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnInit(EventArgs)

C#
protected override void OnPreRender(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnPreRender(EventArgs)

C#
public void RaiseCallbackEvent(string eventArgument)
Parameters:eventArgumentstring

Implements: ICallbackEventHandler.RaiseCallbackEvent(string)

Executed when post data changes should invoke a chagned event

C#
protected virtual void RaisePostDataChangedEvent()

Registers the control with the ScriptManager

C#
protected virtual void RegisterScriptControl()
C#
protected virtual void RegisterScriptDescriptors()
C#
protected override void Render(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: Control.Render(HtmlTextWriter)

C#
protected override object SaveViewState()
Returns:

object

Overrides: Control.SaveViewState()

C#
protected override void TrackViewState()

Overrides: Control.TrackViewState()