You could use the
DataGridView.CellValueChanged event[
^], check if the column matches the street name column and fill the text boxes with desired values.
Here I assume that you have another data table from where you can select a value using the streetID as the key.
Something like this:
First you need a DataTable or a Dictionary where you can look up streetId.
DataTable dtWhatEver = new DataTable("WhatEver");
DataColumn dcStreetId = dtWhatEver.Columns.Add("streetId", typeof(int));
dtWhatEver.PrimaryKey = new DataColumn { dcStreetId };
dtWhatEver.Columns.Add("isfsectionId1", typeof(int));
dtWhatEver.Columns.Add("isfsectionId2", typeof(int));
Fill this table with data from your database or other source.
[UPDATE] Switched places of row and column index
Then implement something similar to this
private void dataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if ((e.RowIndex > -1) && (e.ColumnIndex == 1))
{
int streetId = dataGridView[e.ColumnIndex, e.RowIndex].Value;
DataRow drFound = dtWhatEver.Rows.Find(streetId);
if (drFound == null)
{
}
else
{
dataGridView[3, e.RowIndex].Value = drFound["isfsectionId1"];
dataGridView[4, e.RowIndex].Value = drFound["isfsectionId2"];
}
}
}
Disclaimer
I wrote this code directly here, so there might be a few syntax errors or missing type conversions.
You should get the idea, though.