IBootstrapGridView.MakeRowVisible(Object) Method
Makes the specified data row visible on a Grid View page.
Namespace: DevExpress.AspNetCore.Bootstrap
Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
keyValue | Object | An object that represents a GridView row’s key value. |
Returns
Type | Description |
---|---|
Boolean | true, if a GridView’s row has been found by the specified key value; otherwise, false. |
Remarks
IMPORTANT
Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.
$1 Use the MakeRowVisible method to make the required data row visible. The result of calling this method depends on the specified row’s current visibility state. The following states/results are possible:
- if the specified row is completely visible on the current GridView page, the method does nothing.
- if the specified row belongs to another (not the current one) GridView’s page, this method navigates the control to the corresponding page that contains the required row.
- if the specified row belongs to a collapsed group, the method expands this group and and navigates the control to the corresponding page.
The code snippet below demonstrates how to use the described method.
@(Html.DevExpress()
.BootstrapGridView<Product>("gridView")
.KeyFieldName(m => m.ProductID)
.Columns(columns => {
columns.Add(m => m.ProductName);
columns.Add(m => m.QuantityPerUnit);
columns.Add(m => m.UnitPrice);
})
.OnInitialized((grid, e) => {
var someKeyValue = "UNIQUE_KEY_VALUE";
grid.MakeRowVisible(someKeyValue);
})
.Bind(Model))