- Timestamp:
- 06/28/13 10:41:57 (12 years ago)
- Location:
- branches/HivePerformance/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 9657-9660
- Property svn:mergeinfo changed
-
branches/HivePerformance/sources/HeuristicLab.Data.Views/3.3/StringConvertibleArrayView.cs
r9539 r9663 23 23 using System.ComponentModel; 24 24 using System.Drawing; 25 using System.Linq; 25 26 using System.Text; 26 27 using System.Windows.Forms; … … 53 54 54 55 protected override void DeregisterContentEvents() { 56 Content.ElementNamesChanged -= new EventHandler(Content_ElementNamesChanged); 55 57 Content.ItemChanged -= new EventHandler<EventArgs<int>>(Content_ItemChanged); 56 58 Content.Reset -= new EventHandler(Content_Reset); … … 62 64 Content.ItemChanged += new EventHandler<EventArgs<int>>(Content_ItemChanged); 63 65 Content.Reset += new EventHandler(Content_Reset); 66 Content.ElementNamesChanged += new EventHandler(Content_ElementNamesChanged); 64 67 } 65 68 … … 96 99 dataGridView.Columns[0].Width = dataGridView.Columns[0].GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true); 97 100 } 101 UpdateRowHeaders(); 102 dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders); 98 103 dataGridView.Enabled = true; 104 } 105 106 protected virtual void UpdateRowHeaders() { 107 for (int i = 0; i < dataGridView.RowCount; i++) { 108 if (i < Content.ElementNames.Count()) 109 dataGridView.Rows[i].HeaderCell.Value = Content.ElementNames.ElementAt(i); 110 else 111 dataGridView.Rows[i].HeaderCell.Value = string.Empty; 112 } 113 } 114 115 private void Content_ElementNamesChanged(object sender, EventArgs e) { 116 if (InvokeRequired) 117 Invoke(new EventHandler(Content_ElementNamesChanged), sender, e); 118 else 119 UpdateRowHeaders(); 99 120 } 100 121
Note: See TracChangeset
for help on using the changeset viewer.