Guest User

Guest User

  • Tech Writer
  • 111
  • 10.1k

How to disable Back Button if it selects any records from Grid View

May 12 2021 7:02 AM
private void btnBack_Click(object sender, EventArgs e)
{
//if(Convert.ToString(dgvCollateralSearchAccountResults.SelectedRows[0].Cells[0].Value)
this.Hide();
CollateralWelcome CW = new CollateralWelcome();
CW.Show();
//pnlSearchResults.Show();
//pnlSearch.Show();
}
 
With this piece of code I am able to go back but one condition is there like if user select any records from  
dgvCollateralSearchAccountResults ,Back Button should be disabled.
 
Please suggest me  

Answers (2)