Exemple #1
0
        private void olvLists_CellEditFinished(object sender, ObjectListView.CellEditEventArgs e)
        {
            ApplicationList list = e.RowObject as ApplicationList;

            if (list != null)
            {
                list.Save();
            }
        }
Exemple #2
0
        private void olvLists_CellEditStarting(object sender, ObjectListView.CellEditEventArgs e)
        {
            // Only allow editing of custom lists
            ApplicationList selectedList = olvLists.SelectedObject as ApplicationList;

            if (selectedList != null && selectedList.IsPredefined)
            {
                e.Cancel = true;
            }
            else
            {
                System.Windows.Forms.TextBox txt = e.Control as System.Windows.Forms.TextBox;
                if (txt != null)
                {
                    txt.AutoCompleteMode = AutoCompleteMode.None;
                }
            }
        }