WinForms events that fire when the record changes

  • Thread starter Thread starter Seeker of Wisdom
  • Start date Start date
S

Seeker of Wisdom

Guest
I am converting a MS Access program to C# Windows form. The form contains a Datagridview that should be limited to 1 to 4 entries. In the MS Access version I use "on current" that fires when the record changes and when the form is loaded. It will disable\enable the addrow function in the subform. What would the equal to a event that fires when the record pointer changes. I need to check after a user adds a row to the datagridview and when the record changes.


int MaxRows = 4;
if (shiftPrintersDataGridView.Rows.Count <= MaxRows)
{
shiftPrintersDataGridView.AllowUserToAddRows = true;
}
else
{
shiftPrintersDataGridView.AllowUserToAddRows = false;
}

Continue reading...
 
Back
Top