How to: Select Rows That Contain the Specified Value

This example demonstrates how to select customers who live in the specified country.

An end-user types the country into the search box and clicks Search. The button editor's ButtonClick event is handled to call the ASPxClientGridView.PerformCallback method.

This sends a callback to the server and generates the ASPxGridView.CustomCallback event passing it the country entered by the user. The CustomCallback event is handled to select the customers who live in the specified country.


protected void grid_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
    string country = e.Parameters.ToString();
    for (int i = 0; i < grid.VisibleRowCount; i++)
        if (grid.GetRowValues(i, "Country") != null)
            if (grid.GetRowValues(i, "Country").ToString() == country)