Here are the examples of the csharp api class System.Windows.Forms.CurrencyManager.EndCurrentEdit() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
20 Examples
0
1. Example
View licenseprivate void ChangeParentToRoot(BoundTreeNode childnode) { if (childnode != null) { // ReSharper disable AssignNullToNotNullAttribute _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], null); // ReSharper restore AssignNullToNotNullAttribute _listManager.EndCurrentEdit(); } }
0
2. Example
View licenseprivate void ChangeParentToRoot(BoundTreeNode childnode) { if (childnode != null) { // ReSharper disable AssignNullToNotNullAttribute _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], null); // ReSharper restore AssignNullToNotNullAttribute _listManager.EndCurrentEdit(); } }
0
3. Example
View licenseprivate void ChangeParentToRoot(BoundTreeNode childnode) { if (childnode != null) { // ReSharper disable AssignNullToNotNullAttribute _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], null); // ReSharper restore AssignNullToNotNullAttribute _listManager.EndCurrentEdit(); } }
0
4. Example
View licenseprivate void ChangeParentToRoot(BoundTreeNode childnode) { if (childnode != null) { // ReSharper disable AssignNullToNotNullAttribute _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], null); // ReSharper restore AssignNullToNotNullAttribute _listManager.EndCurrentEdit(); } }
0
5. Example
View licenseprivate void ChangeParentNoAncestor(BoundTreeNode childnode, BoundTreeNode parentNode) { var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
6. Example
View licenseprivate void ChangeParentUpTheSameBranch(BoundTreeNode childnode, BoundTreeNode parentNode, BoundTreeNode replacementeParent, BoundTreeNode placeHolder) { var replacementeParentId = _identifierProperty.GetValue(_listManager.List[replacementeParent.Position]); if (replacementeParentId != null) _parentIdentifierProperty.SetValue(_listManager.List[placeHolder.Position], replacementeParentId); var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
7. Example
View licenseprivate void ChangeParentNoAncestor(BoundTreeNode childnode, BoundTreeNode parentNode) { var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
8. Example
View licenseprivate void ChangeParentUpTheSameBranch(BoundTreeNode childnode, BoundTreeNode parentNode, BoundTreeNode replacementeParent, BoundTreeNode placeHolder) { var replacementeParentId = _identifierProperty.GetValue(_listManager.List[replacementeParent.Position]); if (replacementeParentId != null) _parentIdentifierProperty.SetValue(_listManager.List[placeHolder.Position], replacementeParentId); var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
9. Example
View licenseprivate void ChangeParentNoAncestor(BoundTreeNode childnode, BoundTreeNode parentNode) { var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
10. Example
View licenseprivate void ChangeParentUpTheSameBranch(BoundTreeNode childnode, BoundTreeNode parentNode, BoundTreeNode replacementeParent, BoundTreeNode placeHolder) { var replacementeParentId = _identifierProperty.GetValue(_listManager.List[replacementeParent.Position]); if (replacementeParentId != null) _parentIdentifierProperty.SetValue(_listManager.List[placeHolder.Position], replacementeParentId); var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
11. Example
View licenseprivate void ChangeParentNoAncestor(BoundTreeNode childnode, BoundTreeNode parentNode) { var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
12. Example
View licenseprivate void ChangeParentUpTheSameBranch(BoundTreeNode childnode, BoundTreeNode parentNode, BoundTreeNode replacementeParent, BoundTreeNode placeHolder) { var replacementeParentId = _identifierProperty.GetValue(_listManager.List[replacementeParent.Position]); if (replacementeParentId != null) _parentIdentifierProperty.SetValue(_listManager.List[placeHolder.Position], replacementeParentId); var parentId = _identifierProperty.GetValue(_listManager.List[parentNode.Position]); if (parentId != null) { _parentIdentifierProperty.SetValue(_listManager.List[childnode.Position], parentId); _listManager.EndCurrentEdit(); } }
0
13. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
14. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
15. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
16. Example
View licenseprotected override void OnAfterLabelEdit(LabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } #if WINFORMS var index = e.Item; #else var index = e.Item.Index; #endif if (_listManager.List.Count > index) { var row = _listManager.List[index]; // In a ListView you are only able to edit the first Column. var col = _listManager.GetItemProperties().Find(Columns[0].Text, false); try { if (row != null && col != null) col.SetValue(row, e.Label); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + ": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
17. Example
View licenseprotected override void OnAfterLabelEdit(NodeLabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } var node = e.Node as BoundTreeNode; if (node != null && PrepareValueConvertor() && _valueConverter.IsValid(e.Label)) { try { _displayProperty.SetValue(_listManager.List[node.Position], _valueConverter.ConvertFromString(e.Label)); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + @": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
18. Example
View licenseprotected override void OnAfterLabelEdit(NodeLabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } var node = e.Node as BoundTreeNode; if (node != null && PrepareValueConvertor() && _valueConverter.IsValid(e.Label)) { try { _displayProperty.SetValue(_listManager.List[node.Position], _valueConverter.ConvertFromString(e.Label)); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + @": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
19. Example
View licenseprotected override void OnAfterLabelEdit(NodeLabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } var node = e.Node as BoundTreeNode; if (node != null && PrepareValueConvertor() && _valueConverter.IsValid(e.Label)) { try { _displayProperty.SetValue(_listManager.List[node.Position], _valueConverter.ConvertFromString(e.Label)); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + @": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }
0
20. Example
View licenseprotected override void OnAfterLabelEdit(NodeLabelEditEventArgs e) { if (e.Label == null) { // If you press ESC while editing. e.CancelEdit = true; return; } var node = e.Node as BoundTreeNode; if (node != null && PrepareValueConvertor() && _valueConverter.IsValid(e.Label)) { try { _displayProperty.SetValue(_listManager.List[node.Position], _valueConverter.ConvertFromString(e.Label)); _listManager.EndCurrentEdit(); base.OnAfterLabelEdit(e); } catch (Exception ex) { // If you try to enter strings in number-columns, too long strings or something // else wich is not allowed by the DataSource. MessageBox.Show(Resources.EditFailed + @": " + ex.Message, Resources.EditFailed, MessageBoxButtons.OK, MessageBoxIcon.Error); _listManager.CancelCurrentEdit(); e.CancelEdit = true; } } }