diff options
author | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2009-08-10 11:52:45 +0400 |
---|---|---|
committer | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2009-08-10 11:52:45 +0400 |
commit | a2d077c88c3f84d39dc3c95978a51266b7209ca4 (patch) | |
tree | 1cfeab323c7836d771479e4e4a1f496cf2b2dadd /mcs | |
parent | 673080161033deffc91a30d8c6e201bdea6b14b6 (diff) |
2009-08-10 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* DataGrid.cs: When setting the data source, if we have a user
provided table style available, force a complete bind in case the
column styles for that table style is empty.
svn path=/trunk/mcs/; revision=139622
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 6 | ||||
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 9e9cce50653..3ab28f75c30 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,9 @@ +2009-08-10 Carlos Alberto Cortez <calberto.cortez@gmail.com> + + * DataGrid.cs: When setting the data source, if we have a user + provided table style available, force a complete bind in case the + column styles for that table style is empty. + 2009-08-09 Ivan N. Zlatev <contact@i-nz.net> * DataGridViewCell.cs: Handle null and DBNull values. diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs index fc5b91ddbd9..a6c3edfc683 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGrid.cs @@ -2449,8 +2449,10 @@ namespace System.Windows.Forms } else if (CurrentTableStyle == grid_style || CurrentTableStyle.MappingName != list_name) { // If the style has been defined by the user, use it + // Also, if the user provided style is empty, + // force a bind for it CurrentTableStyle = styles_collection[list_name]; - current_style.CreateColumnsForTable (true); + current_style.CreateColumnsForTable (current_style.GridColumnStyles.Count > 0); } else { current_style.CreateColumnsForTable (true); } |