Jakub,
To be more precise it would be where you setup the grid cell metric. In this method you can setup the bounding box, the current extent in the sample, to limit the are the lines will draw in. Of course we will still use all of the data points you pass in to do the cell value calculation, we just use the bounding box to limit the lines being drawn. Just use an extent different than the current drawing extent in the method below and it should accomplish your goal.
private void CreateGridCellMatrix()
{
//Get the current extent since we use that to gerenate the grid. Of course this is just for
//the demo and in the real world you can use any extent you like
RectangleShape currentDrawingExtent = ExtentHelper.GetDrawingExtent(Map1.CurrentExtent, (float)Map1.ActualWidth, (float)Map1.ActualHeight);
//Calculate the cell size based on how many rows and columns you specified
double cellSize = Math.Min(currentDrawingExtent.Width / double.Parse(txtGridIsoLineCellColumnCount.Text), currentDrawingExtent.Height / Int32.Parse(txtGridIsoLineCellRowCount.Text));
//Greate the grid definition based on the extent, cell size etc.
GridDefinition gridDefinition = new GridDefinition(currentDrawingExtent, cellSize, -9999, wellDepthPointData);
//Generate the grid based on Inverse Distance Weighted interpolation model. You can define your own model if needed.
gridCellMatrix = GridFeatureSource.GenerateGridMatrix(gridDefinition, new InverseDistanceWeightedGridInterpolationModel(2, double.MaxValue));
}