Skip to content

Commit

Permalink
fix named columns count
Browse files Browse the repository at this point in the history
  • Loading branch information
mnieto committed Jun 20, 2016
1 parent fbe372c commit f5d487d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions SideBySide/ListsConfigurationFrm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions SideBySide/ListsConfigurationFrm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,10 @@ public partial class ListsConfigurationFrm : Form {
e.Cancel = true;
}

private void dataGridView1_UpdateColumnsCount(object sender, DataGridViewRowsAddedEventArgs e) {
FillOptions.NumColumns = dataGridView1.Rows.Count;
}

private void dataGridView1_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e) {
FillOptions.NumColumns -= e.RowCount;
private void bindingSource1_ListChanged(object sender, ListChangedEventArgs e) {
var source = bindingSource1.DataSource as List<ColumDef>;
if (source != null)
FillOptions.NumColumns = source.Count;
}
}
}

0 comments on commit f5d487d

Please sign in to comment.