Muokkaa

Jaa


ModelDataSourceView Class

Definition

Represents a single view of a ModelDataSource control.

public ref class ModelDataSourceView : System::Web::UI::DataSourceView, System::Web::UI::IStateManager
public class ModelDataSourceView : System.Web.UI.DataSourceView, System.Web.UI.IStateManager
type ModelDataSourceView = class
    inherit DataSourceView
    interface IStateManager
Public Class ModelDataSourceView
Inherits DataSourceView
Implements IStateManager
Inheritance
ModelDataSourceView
Implements

Remarks

For a tutorial series on using model binding with Web Forms, see Model Binding and Web Forms.

Constructors

ModelDataSourceView(ModelDataSource)

Initializes a new instance of the ModelDataSourceView class.

Properties

CanDelete

Gets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports the delete operation.

CanInsert

Gets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports the insert operation.

CanPage

Gets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports paging through the retrieved data.

CanRetrieveTotalRowCount

Gets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports retrieving the total number of data rows, in addition to the set of data.

CanSort

Gets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports a sorted view on the underlying data source.

CanUpdate

Gets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports the update operation.

DataKeyName

Gets the first item in the DataKeyNames array of the data-bound control if the data-bound control is a FormView, ListView, GridView, or DetailsView control.

DeleteMethod

Gets or sets the name of the method that the ModelDataSourceView object invokes to delete data.

Events

Gets a list of event-handler delegates for the data source view.

(Inherited from DataSourceView)
InsertMethod

Gets or sets the name of the method that the ModelDataSourceView object invokes to insert data.

ModelTypeName

Gets the data type name for the data bound control.

Name

Gets the name of the data source view.

(Inherited from DataSourceView)
SelectMethod

Gets or sets the name of the method that the ModelDataSourceView control invokes to retrieve data.

UpdateMethod

Gets or sets the name of the method that the ModelDataSourceView object invokes to update data.

Methods

CanExecute(String)

Determines whether the specified command can be executed.

(Inherited from DataSourceView)
CreateSelectResult(Object)

Returns the result of a Select operation after converting it to an IEnumerable collection if it is not already one.

Delete(IDictionary, IDictionary, DataSourceViewOperationCallback)

Deletes a method and gets the result.

Delete(IDictionary, IDictionary, DataSourceViewOperationCallback)

Performs an asynchronous delete operation on the list of data that the DataSourceView object represents.

(Inherited from DataSourceView)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
EvaluateDeleteMethodParameters(IDictionary, IDictionary)

Invokes the Delete method and gets the result.

EvaluateInsertMethodParameters(IDictionary)

Invokes the insert method.

EvaluateMethodParameters(DataSourceOperation, ModelDataSourceMethod, IDictionary, Boolean)

Evaluates the method parameters for model binding, using the data source operation, the data source method object, the control values, and a value that indicates whether this method is called in the page's LoadComplete event handler.

EvaluateMethodParameters(DataSourceOperation, ModelDataSourceMethod, IDictionary)

Evaluates the method parameters for model binding, using the data source operation, the data source method object, and the control values.

EvaluateSelectMethodParameters(DataSourceSelectArguments, DataSourceSelectResultProcessingOptions)

Evaluates the select method parameters and also determines the options for processing the select result, such as auto paging and sorting behavior.

EvaluateUpdateMethodParameters(IDictionary, IDictionary, IDictionary)

Invokes the Update method and gets the result.

ExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback)

Executes the specified command.

(Inherited from DataSourceView)
ExecuteCommand(String, IDictionary, IDictionary)

Executes the specified command.

(Inherited from DataSourceView)
ExecuteDelete(IDictionary, IDictionary)

Performs a delete operation using the DeleteMethod method.

ExecuteInsert(IDictionary)

Performs an insert operation using the InsertMethod method.

ExecuteSelect(DataSourceSelectArguments)

Performs a select operation using the SelectMethod method.

ExecuteUpdate(IDictionary, IDictionary, IDictionary)

Performs an update operation using the UpdateMethod method.

FindMethod(String)

Finds the method to be executed.

GetDeleteMethodResult(IDictionary, IDictionary)

Invokes the delete method and gets the result.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetInsertMethodResult(IDictionary)

Invokes the insert method and gets the result.

GetSelectMethodResult(DataSourceSelectArguments)

Invokes the select method and gets the result.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetUpdateMethodResult(IDictionary, IDictionary, IDictionary)

Invokes the update method and gets the result.

Insert(IDictionary, DataSourceViewOperationCallback)

Inserts a method and gets the result.

Insert(IDictionary, DataSourceViewOperationCallback)

Performs an asynchronous insert operation on the list of data that the DataSourceView object represents.

(Inherited from DataSourceView)
InvokeMethod(ModelDataSourceMethod)

Invokes a data method.

IsTrackingViewState()

Returns a value that indicates whether the control stores state in view state.

LoadViewState(Object)

Restores previously saved view state for the data source view.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnCallingDataMethods(CallingDataMethodsEventArgs)

Raises the CallingDataMethods event.

OnDataSourceViewChanged(EventArgs)

Raises the DataSourceViewChanged event.

(Inherited from DataSourceView)
ProcessSelectMethodResult(DataSourceSelectArguments, DataSourceSelectResultProcessingOptions, ModelDataMethodResult)

Performs operations on the select method result like auto paging and sorting if applicable.

RaiseUnsupportedCapabilityError(DataSourceCapabilities)

Called by the RaiseUnsupportedCapabilitiesError(DataSourceView) method to compare the capabilities requested for an ExecuteSelect(DataSourceSelectArguments) operation against those that the view supports.

(Inherited from DataSourceView)
SaveViewState()

Saves the changes to the view state for the ModelDataSourceView object since the time when the page was posted back to the server.

Select(DataSourceSelectArguments, DataSourceViewSelectCallback)

Selects the method and gets the result.

Select(DataSourceSelectArguments, DataSourceViewSelectCallback)

Gets a list of data asynchronously from the underlying data storage.

(Inherited from DataSourceView)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
TrackViewState()

Causes the ModelDataSourceView object to track changes to its view state so that the changes can be stored in the ViewState object for the control and persisted across requests for the same page.

Update(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback)

Updates the specified methods using the values provided in the parameters.

Update(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback)

Performs an asynchronous update operation on the list of data that the DataSourceView object represents.

(Inherited from DataSourceView)
UpdateProperties(String, String, String, String, String, String)

Updates the specified properties using the values provided in the parameters.

Events

CallingDataMethods

Occurs when data methods are being called.

DataSourceViewChanged

Occurs when the data source view has changed.

(Inherited from DataSourceView)

Explicit Interface Implementations

IStateManager.IsTrackingViewState

Gets a value indicating whether a server control is tracking its view state changes.

IStateManager.LoadViewState(Object)

Loads the server control's previously saved view state to the control.

IStateManager.SaveViewState()

Saves the changes to a server control's view state to an Object.

IStateManager.TrackViewState()

Instructs the server control to track changes to its view state.

Applies to