System.Web.UI.WebControls.GridView: Method Members

The methods of System.Web.UI.WebControls.GridView are listed below. For a list of all members, see the GridView Members list.

See Also: Inherited members from System.Web.UI.WebControls.CompositeDataBoundControl

Public Methods

override
DataBind()

Binds the data source to the System.Web.UI.WebControls.GridView control. This method cannot be inherited.

DeleteRow(int)

Deletes the record at the specified index from the data source.

IsBindableType(Type) : bool

Determines whether the specified data type can be bound to a column in a System.Web.UI.WebControls.GridView control.

Sort(string, SortDirection)

Sorts the System.Web.UI.WebControls.GridView control based on the specified sort expression and direction.

UpdateRow(int, bool)

Updates the record at the specified row index using the field values of the row.

Protected Methods

CreateAutoGeneratedColumn(AutoGeneratedFieldProperties) : AutoGeneratedField

Creates an automatically generated column field.

override
CreateChildControls(IEnumerable, bool) : int

Creates the control hierarchy used to render the System.Web.UI.WebControls.GridView control using the specified data source.

CreateChildTable() : Table

Creates a new child table.

CreateColumns(PagedDataSource, bool) : ICollection

Creates the set of column fields used to build the control hierarchy.

override
CreateControlStyle() : Style

Creates the default style for the control.

override
CreateDataSourceSelectArguments() : System.Web.UI.DataSourceSelectArguments

Creates the System.Web.UI.DataSourceSelectArguments object that contains the arguments that get passed to the data source for processing.

CreateRow(int, int, DataControlRowType, DataControlRowState) : GridViewRow

Creates a row in the System.Web.UI.WebControls.GridView control.

ExtractRowValues(System.Collections.Specialized.IOrderedDictionary, GridViewRow, bool, bool)

Retrieves the values of each field declared within the specified row and stores them in the specified System.Collections.Specialized.IOrderedDictionary object.

GetCallbackResult() : string

Returns the result of a callback event that targets a control.

GetCallbackScript(IButtonControl, string) : string

Creates the callback script for a button that performs a sorting operation.

InitializePager(GridViewRow, int, PagedDataSource)

Initializes the pager row displayed when the paging feature is enabled.

InitializeRow(GridViewRow, DataControlField[])

Initializes a row in the System.Web.UI.WebControls.GridView control.

override
LoadControlState(object)

Loads the state of the properties in the System.Web.UI.WebControls.GridView control that need to be persisted, even when the System.Web.UI.Control.EnableViewState property is set to false.

override
LoadViewState(object)

Loads the previously saved view state of the System.Web.UI.WebControls.GridView control.

override
OnBubbleEvent(object, EventArgs) : bool

Determines whether the event for the Web server control is passed up the page's user interface (UI) server control hierarchy.

override
OnDataPropertyChanged()

Rebinds the System.Web.UI.WebControls.GridView control to its data after the DataBoundControl.DataMember, BaseDataBoundControl.DataSource, or DataBoundControl.DataSourceID property is changed.

override
OnDataSourceViewChanged(object, EventArgs)

Raises the System.Web.UI.DataSourceView.DataSourceViewChanged event.

override
OnInit(EventArgs)

Raises the System.Web.UI.Control.Init event.

OnPageIndexChanged(EventArgs)

Raises the GridView.PageIndexChanged event.

OnPageIndexChanging(GridViewPageEventArgs)

Raises the GridView.PageIndexChanging event.

override
OnPagePreLoad(object, EventArgs)

Sets the initialized state of the data-bound control before the control is loaded.

override
OnPreRender(EventArgs)

Raises the System.Web.UI.Control.PreRender event.

OnRowCancelingEdit(GridViewCancelEditEventArgs)

Raises the GridView.RowCancelingEdit event.

OnRowCommand(GridViewCommandEventArgs)

Raises the GridView.RowCommand event.

OnRowCreated(GridViewRowEventArgs)

Raises the GridView.RowCreated event.

OnRowDataBound(GridViewRowEventArgs)

Raises the GridView.RowDataBound event.

OnRowDeleted(GridViewDeletedEventArgs)

Raises the GridView.RowDeleted event.

OnRowDeleting(GridViewDeleteEventArgs)

Raises the GridView.RowDeleting event.

OnRowEditing(GridViewEditEventArgs)

Raises the GridView.RowEditing event.

OnRowUpdated(GridViewUpdatedEventArgs)

Raises the GridView.RowUpdated event.

OnRowUpdating(GridViewUpdateEventArgs)

Raises the GridView.RowUpdating event.

OnSelectedIndexChanged(EventArgs)

Raises the GridView.SelectedIndexChanged event.

OnSelectedIndexChanging(GridViewSelectEventArgs)

Raises the GridView.SelectedIndexChanging event.

OnSorted(EventArgs)

Raises the GridView.Sorted event.

OnSorting(GridViewSortEventArgs)

Raises the GridView.Sorting event.

override
PerformDataBinding(IEnumerable)

Binds the specified data source to the System.Web.UI.WebControls.GridView control.

PrepareControlHierarchy()

Establishes the control hierarchy.

RaiseCallbackEvent(string)

Creates the arguments for the callback handler in the System.Web.UI.ClientScriptManager.GetCallbackEventReference(System.Web.UI.Control, string, string, string, bool) method.

RaisePostBackEvent(string)

Raises the appropriate events for the System.Web.UI.WebControls.GridView control when it posts back to the server.

override
Render(System.Web.UI.HtmlTextWriter)

Renders the Web server control content to the client's browser using the specified System.Web.UI.HtmlTextWriter object.

override
SaveControlState() : object

Saves the state of the properties in the System.Web.UI.WebControls.GridView control that need to be persisted, even when the System.Web.UI.Control.EnableViewState property is set to false.

override
SaveViewState() : object

Loads the previously saved view state of the System.Web.UI.WebControls.GridView control.

override
TrackViewState()

Tracks view-state changes to the System.Web.UI.WebControls.GridView control so they can be stored in the control's System.Web.UI.StateBag object. This object is accessible through the System.Web.UI.Control.ViewState property.