Using other DataWindow methods

There are many more methods you can use to perform activities in DataWindow controls. The more common ones are listed in Table 3-3. These methods are all available on the DataWindowControl. The Client and Server columns indicate whether each method is available on the Web DataWindow client or the WebDataWindowControl server control.

Table 3-3: Common methods in DataWindow controls

Method

Purpose

Client

Server

AcceptText

Applies the contents of the edit control to the current item in the DataWindow control

Yes

No

DeleteRow

Removes the specified row from the DataWindow control, placing it in the Delete buffer; does not delete the row from the database

Yes

Yes

Filter

Displays rows in the DataWindow control based on the current filter

No

Yes

GetRowFromRowId, GetRowIdFromRow

Returns a row number from its identifier, or a row’s identifier from its row number

No

Yes

InsertRow

Inserts a new row

Yes

Yes

Reset

Clears all rows in the DataWindow control

No

Yes

Retrieve

Retrieves rows from the database

Yes

Yes

RowsCopy, RowsMove

Copies or moves rows from one DataWindow control to another or from one buffer to another within a DataWindow control

No

Yes

RowsDiscard

Discards a range of rows in a DataWindow control

No

Yes

Scroll

Scrolls according to a specified scroll type or to a specified row

No

No

SelectRow

Highlights a specified row

Yes

Yes

ShareData

Shares data among different DataWindow controls

No

Yes

Sort

Sorts the rows in a DataWindow control using the DataWindow's current sort criteria

Yes

Yes

UpdateData (Update on client control)

Sends to the database all inserts, changes, and deletions that have been made in the DataWindow control

Yes

Yes

The Web DataWindow client and server controls both support ScrollFirstPage, ScrollLastPage, ScrollPriorPage, and ScrollNextPage methods. You can see a complete list of DataWindowControl and WebDataWindowControl methods in the Object Browser or the online Help in Visual Studio .NET. For a list of Web DataWindow client methods, see “Calling client methods”.