Grid

Reading Data

GetCell retrieves the value at a specific row and column index. GetEnumerator returns an iterator over the rows - use it in a foreach loop to process rows one at a time. Count returns the total number of elements in the grid (rows x columns). Contains checks whether a specific value exists anywhere in the grid. Clone creates a shallow copy of the grid, useful when you need to preserve the original while modifying a working copy.

Examples

GPAL Fluent: High-level fluent C# API

//GetCell uses zero-based row and column indexes. GetEnumerator yields List<T> objects - each list represents one row. Use row[columnIndex] to access individual cells within the row.

// Read a specific cell

string email = grid.GetCell(1, 1);


// Iterate rows

foreach (var row in grid) {

string name = row[0];

string status = row[2];

Console.WriteLine($"{name}: {status}");

}


// Check for a value

if (grid.Contains("inactive")) {

Console.WriteLine("Found inactive records");

}

💬 Ask GPAL