I dont have enough info so far this is what i can help for now
use this snippets as your guide
public void page_Load()
{
this.LoadYourData();
var firstColumn=GridView1.SelectedRow.Cells[0].Text;
var secondColumn=GridView1.SelectedRow.Cells[1].Text;
if(!Page.IsPostBack)
{
if(firstColumn.StartWith("000"))
{
textfoscode.Text=firstColumn;
}
if(secondColumn.StartWith("551"))
{
texformno.Text=secondColumn;
}
}
}
public void LoadYourData()
{
}