Skip to main content
Tab

ASPxGridView.GetCurrentPageRowValues(String[]) Method

Returns the row values displayed within the current page.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public List<object> GetCurrentPageRowValues(
    params string[] fieldNames
)

Parameters

Name Type Description
fieldNames String[]

The names of data source fields whose values are returned.

Returns

Type Description
List<Object>

The list of objects that contain row values displayed within the current page.

Remarks

If you call the GetCurrentPageRowValues method while an unbound grid control builds its hierarchy (for example, within the HtmlRowCreated, CustomButtonInitialize or ContextMenuItemVisibility event handlers), the GetRowValues(Int32, String[]) method rebinds to data to reset the hierarchy. It might result in displaying the grid with empty data and losing values entered by an end user. To avoid this behavior, call the grid’s ASPxWebControl.DataBind method within the Page_Load event handler.

List <object> rowValues = sender.GetCurrentPageRowValues(new string[] { "CheckId", "Check" });
int startCk = 0;
if (rowValues.Count() > 0)
    foreach (object[] selectedValues in rowValues) 
        startCk = (int)selectedValues[1];
// ...
See Also