/// <summary>
        /// Event handler that sets the new value for the value column
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == nameNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)FKConstraintListWrapper.FKConstraintListColumns.Name, e.Value as String);
                        }
                    }
                    else if (sender == targetNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)FKConstraintListWrapper.FKConstraintListColumns.RefTable, e.Value as String);
                        }
                    }

                    RefreshModel();
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == columnEnabledFkNodeControl)
                    {
                        e.Value = ((FKConstraintColumnsListWrapper)grtList).get_column_is_fk(node.NodeId);
                    }
                    else if (sender == nameNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)FKConstraintColumnsListWrapper.FKConstraintColumnsListColumns.Column, out caption);

                        e.Value = caption;
                    }
                    else if (sender == targetColumnNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)FKConstraintColumnsListWrapper.FKConstraintColumnsListColumns.RefColumn, out caption);

                        e.Value = caption;
                    }
                }
            }
        }
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == nameNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)FKConstraintListWrapper.FKConstraintListColumns.Name, out caption);

                        e.Value = caption;
                    }
                    else if (sender == targetNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)FKConstraintListWrapper.FKConstraintListColumns.RefTable, out caption);

                        e.Value = caption;
                    }
                }
            }
        }
        private void EditorInitialize(object sender, EditorInitializeEventArgs e)
        {
            if (sender == nameNodeControl)
            {
                TextBox textBox = e.Editor as TextBox;
                if (textBox != null)
                {
                    textBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
                }
            }
            else if (sender == targetNodeControl)
            {
                ComboBox comboBox = e.Editor as ComboBox;
                if (comboBox != null)
                {
                    if (e.Node != null && e.Node.Tag != null)
                    {
                        GrtListNode node = e.Node.Tag as GrtListNode;

                        String value;
                        grtList.get_field(node.NodeId, (int)FKConstraintListWrapper.FKConstraintListColumns.RefTable, out value);

                        comboBox.Items.Clear();
                        using (Graphics graphics = comboBox.CreateGraphics())
                        {
                            float         maxWidth = 200; // Minimum width
                            List <string> tables   = mySQLTableEditorWrapper.get_all_table_names();
                            foreach (string table in tables)
                            {
                                comboBox.Items.Add(table);
                                SizeF size = graphics.MeasureString(table, comboBox.Font);
                                if (size.Width > maxWidth)
                                {
                                    maxWidth = size.Width;
                                }

                                // Make sure the previous selected item is selected again
                                if (table.Equals(value))
                                {
                                    comboBox.SelectedIndex = comboBox.Items.Count - 1;
                                }
                            }

                            // Limit width to a sane value.
                            if (maxWidth > 700)
                            {
                                maxWidth = 700;
                            }
                            comboBox.DropDownWidth = (int)Math.Ceiling(maxWidth);
                        }
                    }

                    comboBox.KeyDown        += new KeyEventHandler(textBox_KeyDown);
                    comboBox.DropDownClosed += new EventHandler(comboBox_DropDownClosed);
                }
            }
        }
        private void roleRemoveButton_Click(object sender, EventArgs e)
        {
            foreach (Aga.Controls.Tree.TreeNodeAdv node in rolesTreeView.SelectedNodes)
            {
                GrtListNode aNode = node.Tag as GrtListNode;

                objectRoleListBE.remove_role_from_privileges(roleTreeBE.get_role_with_id(aNode.NodeId));
            }
            objectRoleListModel.RefreshModel();
        }
        private void rolesTreeView_SelectionChanged(object sender, EventArgs e)
        {
            if (rolesTreeView.SelectedNode == null)
            {
                roleRemoveButton.Enabled = false;
                objectRoleListBE.set_selected(new NodeIdWrapper());
            }
            else
            {
                GrtListNode aNode = rolesTreeView.SelectedNode.Tag as GrtListNode;

                roleRemoveButton.Enabled = true;
                objectRoleListBE.set_selected(aNode.NodeId);
            }
            RefreshPrivilegesList();
        }
Ejemplo n.º 7
0
        private void EditorInitialize(object sender, EditorInitializeEventArgs e)
        {
            if (sender == nameNodeControl)
            {
                TextBox textBox = e.Editor as TextBox;
                if (textBox != null)
                {
                    if (TreeView.CurrentNode.Index == 0)
                    {
                        textBox.Text = "id" + mySQLTableEditorWrapper.get_name();
                    }

                    textBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
                }
            }
            else if (sender == targetColumnNodeControl)
            {
                ComboBox comboBox = e.Editor as ComboBox;
                if (comboBox != null)
                {
                    comboBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
                }

                GrtListNode node = treeView.CurrentNode.Tag as GrtListNode;

                List <string> columns = ((FKConstraintColumnsListWrapper)GrtList).get_ref_columns_list(node.NodeId, false);

                string selected;
                grtList.get_field(node.NodeId, (int)FKConstraintColumnsListWrapper.FKConstraintColumnsListColumns.RefColumn, out selected);

                comboBox.Items.Clear();
                comboBox.Items.AddRange(columns.ToArray());

                int i = 0;
                foreach (String col in columns)
                {
                    if (col == selected)
                    {
                        comboBox.SelectedIndex = i;
                    }
                    i++;
                }
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Event handler that sets the new value for the value column
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == columnEnabledFkNodeControl)
                    {
                        bool isFK = (CheckState)e.Value == CheckState.Checked;
                        if (((FKConstraintColumnsListWrapper)grtList).set_column_is_fk(node.NodeId, isFK) && isFK)
                        {
                            // Sart editing the column only if it is enabled as FK column.
                            targetColumnNodeControl.Parent.SelectedNode = e.Node;
                            targetColumnNodeControl.BeginEdit();
                        }
                    }
                    else if (sender == nameNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)FKConstraintColumnsListWrapper.FKConstraintColumnsListColumns.Column, e.Value as String);
                        }
                    }
                    else if (sender == targetColumnNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)FKConstraintColumnsListWrapper.FKConstraintColumnsListColumns.RefColumn, e.Value as String);

                            // Setting a target column implicitly enables this columns a FK column.
                            ((FKConstraintColumnsListWrapper)grtList).set_column_is_fk(node.NodeId, true);
                        }
                    }

                    RefreshModel();
                }
            }
        }
        /// <summary>
        /// Returns a node list of all child nodes of a given parent node
        /// </summary>
        /// <param name="treePath">The path of the parent node</param>
        /// <returns>The list of child nodes for the given parent path node</returns>
        public override System.Collections.IEnumerable GetChildren(TreePath treePath)
        {
            List <GrtListNode> items = new List <GrtListNode>();

            int count = grtList.count();

            for (int i = 0; i < count; i++)
            {
                NodeIdWrapper nodeId = grtList.get_node(i);
                GrtListNode   node;
                string        caption;

                grtList.get_field(nodeId, 0, out caption);

                node = new GrtListNode(caption, nodeId, null, this);

                items.Add(node);
            }
            return(items);
        }
        private void EditorInitialize(object sender, EditorInitializeEventArgs e)
        {
            if (sender == nameNodeControl)
            {
                TextBox textBox = e.Editor as TextBox;
                if (textBox != null)
                {
                    textBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
                }
            }
            else if (sender == typeNodeControl)
            {
                ComboBox comboBox = e.Editor as ComboBox;
                if (comboBox != null)
                {
                    if (e.Node != null && e.Node.Tag != null)
                    {
                        GrtListNode node = e.Node.Tag as GrtListNode;

                        String value;
                        grtList.get_field(node.NodeId, (int)IndexListWrapper.IndexListColumns.Type, out value);

                        comboBox.Items.Clear();
                        List <string> indexTypes = tableEditorWrapper.get_index_types();
                        foreach (string indexType in indexTypes)
                        {
                            comboBox.Items.Add(indexType);

                            // Make sure the previous selected item is selected again
                            if (indexType.Equals(value))
                            {
                                comboBox.SelectedIndex = comboBox.Items.Count - 1;
                            }
                        }
                    }

                    comboBox.KeyDown        += new KeyEventHandler(textBox_KeyDown);
                    comboBox.DropDownClosed += new EventHandler(comboBox_DropDownClosed);
                }
            }
        }
        /// <summary>
        /// Event handler that sets the new value for the value column
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == enabledNodeControl)
                    {
                        ((IndexColumnsListWrapper)grtList).set_column_enabled(node.NodeId, (CheckState)e.Value == CheckState.Checked);
                    }
                    else if (sender == nameNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Name, value);
                        }
                    }
                    else if (sender == orderNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            //int intValue = Convert.ToInt32(value);
                            int intValue = 0;
                            try
                            {
                                intValue = Convert.ToInt32(value);
                                grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.OrderIndex, intValue);
                            }
                            catch (FormatException)
                            {
                            }
                        }
                    }
                    if (sender == storageNodeControl)
                    {
                        String value = e.Value as String;

                        if (value != null)
                        {
                            int intValue = 0;
                            if (value.Equals("DESC"))
                            {
                                intValue = 1;
                            }

                            grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Descending, intValue);
                        }
                    }
                    else if (sender == lengthNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            try
                            {
                                int intValue = Convert.ToInt32(value);
                                grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Length, intValue);
                            }
                            catch (Exception)
                            {
                                grtList.set_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Length, "");
                            }
                        }
                    }
                    RefreshModel();
                }
            }
        }
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == enabledNodeControl)
                    {
                        e.Value = ((IndexColumnsListWrapper)grtList).get_column_enabled(node.NodeId);
                    }
                    else if (sender == nameNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Name, out caption);

                        e.Value = caption;
                    }
                    else if (sender == orderNodeControl)
                    {
                        string caption;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.OrderIndex, out caption);

                        e.Value = caption;
                    }
                    else if (sender == storageNodeControl)
                    {
                        int val;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Descending, out val);

                        if (val == 1)
                        {
                            e.Value = "DESC";
                        }
                        else
                        {
                            e.Value = "ASC";
                        }
                    }
                    else if (sender == lengthNodeControl)
                    {
                        int val;

                        grtList.get_field(node.NodeId, (int)IndexColumnsListWrapper.IndexColumnsListColumns.Length, out val);

                        if (val > 0)
                        {
                            e.Value = Convert.ToString(val);
                        }
                        else
                        {
                            e.Value = "";
                        }
                    }
                }
            }
        }
Ejemplo n.º 13
0
        private void EditorInitialize(object sender, EditorInitializeEventArgs e)
        {
            if (sender == nameNodeControl)
            {
                TextBox textBox = e.Editor as TextBox;
                if (textBox != null)
                {
                    // Only do for the placeholder row.
                    if (TreeView.CurrentNode.Index == grtList.count() - 1)
                    {
                        if (e.Node != null && e.Node.Tag != null)
                        {
                            GrtListNode node = e.Node.Tag as GrtListNode;

                            String value;
                            grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, out value);

                            if (value.Equals(""))
                            {
                                // Mark this row as placeholder. This activates special handling in the backend
                                // (e.g. default value generation).
                                grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, 1);

                                // Read the default value and initialize the editor control with it.
                                grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, out value);
                                textBox.Text = value;
                            }
                        }
                    }

                    textBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
                    textBox.Leave   += new EventHandler(textBox_Leave);
                }
            }
            else if (sender == datatypeComboBoxNodeControl)
            {
                ComboBox comboBox = e.Editor as ComboBox;
                if (comboBox != null)
                {
                    if (e.Node != null && e.Node.Tag != null)
                    {
                        GrtListNode node = e.Node.Tag as GrtListNode;

                        String value;
                        grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Type, out value);

                        if (value.Equals(""))
                        {
                            grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, 1);
                            comboBox.Text = value;
                        }
                        else
                        {
                            comboBox.Text = value;
                        }
                    }

                    // BOOL/BOOLEAN as well as a few others types listed here
                    // http://dev.mysql.com/doc/refman/5.6/en/other-vendor-data-types.html
                    // are not supported by server but rather converted to the
                    // corresponding native types. WB pre-loads these types as user-defined.

                    comboBox.Items.Clear();
                    comboBox.Items.AddRange(((MySQLTableColumnsListWrapper)grtList).get_datatype_names().ToArray());

                    comboBox.DropDownHeight = 450;
                    comboBox.KeyDown       += new KeyEventHandler(textBox_KeyDown);
                    comboBox.Leave         += new EventHandler(comboBox_Leave);
                }
            }
            else if (sender == defaultNodeControl)
            {
                TextBox textBox = e.Editor as TextBox;
                if (textBox != null)
                {
                    textBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
                    textBox.Leave   += new EventHandler(textBox_Leave);
                }
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Event handler that sets the new value for the value column
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ValuePushed(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                int selIndex = e.Node.Index;

                GrtListNode node = e.Node.Tag as GrtListNode;

                // Activate column placeholder row if we a value for it must be set here.
                if (e.Node.Index == TreeView.Root.Children.Count - 1)
                {
                    activateColumnPlaceholder(node.NodeId);
                }

                if (node != null)
                {
                    if (sender == nameNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, e.Value as String);
                        }
                    }
                    else if (sender == datatypeComboBoxNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            if (!grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Type, e.Value as String))
                            {
                                CustomMessageBox.Show(MessageType.MessageError, "Could not set new data type",
                                                      "The given data type\n\n" + value + "\n\ncontains errors and cannot be accepted. " +
                                                      "The previous value is kept instead.", "Close");
                            }
                        }
                    }
                    else if (sender == pkNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, intValue);
                    }
                    else if (sender == nnNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsNotNull, intValue);
                    }
                    else if (sender == uqNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnique, intValue);
                    }
                    else if (sender == binNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsBinary, intValue);
                    }
                    else if (sender == unNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnsigned, intValue);
                    }
                    else if (sender == zfNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsZerofill, intValue);
                    }
                    else if (sender == aiNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsAutoIncrement, intValue);
                    }
                    else if (sender == gNodeControl)
                    {
                        int intValue = Convert.ToInt16(e.Value);
                        grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsGenerated, intValue);
                    }
                    else if (sender == defaultNodeControl)
                    {
                        String value = e.Value as String;
                        if (value != null)
                        {
                            grtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Default, e.Value as String);
                        }
                    }

                    RefreshModel();

                    if (selIndex > -1)
                    {
                        TreeView.SelectedNode = TreeView.Root.Children[selIndex];
                    }

                    if (listener != null)
                    {
                        listener.ValueChanged(sender as BindableControl, e.Value);
                    }
                }
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Event handler that gets the caption for the value column
        /// </summary>
        /// <param name="sender">The object triggering the event</param>
        /// <param name="e">The event parameter</param>
        private void ValueNeeded(object sender, NodeControlValueEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
            {
                GrtListNode node = e.Node.Tag as GrtListNode;

                if (node != null)
                {
                    if (sender == nameNodeControl)
                    {
                        string caption;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Name, out caption))
                        {
                            e.Value = caption;
                        }
                    }
                    else if (sender == datatypeComboBoxNodeControl)
                    {
                        string caption;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Type, out caption))
                        {
                            e.Value = caption;
                        }
                    }
                    else if (sender == pkNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == nnNodeControl)
                    {
                        int notNull;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsNotNull, out notNull))
                        {
                            e.Value = (notNull == 1);
                        }
                    }
                    else if (sender == uqNodeControl)
                    {
                        int unique;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnique, out unique))
                        {
                            e.Value = (unique == 1);
                        }
                    }
                    else if (sender == binNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsBinary, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == unNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsUnsigned, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == zfNodeControl)
                    {
                        int value;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsZerofill, out value))
                        {
                            e.Value = (value == 1);
                        }
                    }
                    else if (sender == aiNodeControl)
                    {
                        int autoInc;

                        // Show the actual value, even if the field would not allow auto increment.
                        // While editing allow to reset the auto inc value but prevent setting it if the
                        // column data type does not allow it.

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsAutoIncrement, out autoInc))
                        {
                            e.Value = (autoInc == 1);
                        }
                    }
                    else if (sender == gNodeControl)
                    {
                        int generated;
                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsGenerated, out generated))
                        {
                            e.Value = (generated == 1);
                        }
                    }
                    else if (sender == defaultNodeControl)
                    {
                        string caption;

                        if (grtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.Default, out caption))
                        {
                            e.Value = caption;
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Returns a node list of all child nodes of a given parent node
        /// </summary>
        /// <param name="treePath">The path of the parent node</param>
        /// <returns>The list of child nodes for the given parent path node</returns>
        public override System.Collections.IEnumerable GetChildren(TreePath treePath)
        {
            List<GrtListNode> items = new List<GrtListNode>();

            int count = grtList.count();
            for (int i = 0; i < count; i++)
            {
                NodeIdWrapper nodeId = grtList.get_node(i);
                GrtListNode node;
                string caption;

                grtList.get_field(nodeId, 0, out caption);

                node = new GrtListNode(caption, nodeId, null, this);

                items.Add(node);
            }
            return items;
        }