示例#1
0
        //control the current cell
        void gridGroupingControl1_TableControlCurrentCellActivated(object sender, GridTableControlEventArgs e)
        {
            // Retrieve the current element
            Element el = GetNestedCurrentElement();

            if (el != null)
            {
                Record r = el.GetRecord();
                // current field.
                if (r != null)
                {
                    GridTable table = (GridTable)r.ParentDetails.ParentChildTable.ParentTable;

                    FieldDescriptor fd = table.CurrentRecordManager.CurrentField;
                    if (fd != null)
                    {
                        this.lblCell.Text = r.GetValue(fd.Name).ToString();

                        // TableCellStyle
                        GridTableCellStyleInfo style = table.GetTableCellStyle(r, fd);
                        this.lblCell.Text += " (" + style.ToString().Replace('\n', ';') + ")";

                        GridTableCellStyleInfoIdentity identity = style.TableCellIdentity;

                        // you can check identity for more information about cell.
                    }
                }
                // Record
                this.lblElement.Text = el.ToString();
            }
        }
        private void GGC_TableControlCurrentCellActivated(object sender, GridTableControlEventArgs e)
        {
            //Notify the double click performed in a cell
            Record rec = GGC.Table.DisplayElements[e.TableControl.CurrentCell.RowIndex].ParentRecord;

            //If(rec) IsNot Nothing Then
            if (rec != null)
            {
                frmUserDetail.TeacherID = rec.GetValue("TeacherID").ToString();
                currentCellIndex        = e.TableControl.CurrentCell.RowIndex;
            }
        }
        private void GGC_TableControlCurrentCellActivated(object sender, GridTableControlEventArgs e)
        {
            //Notify the double click performed in a cell
            Record rec = GGC.Table.DisplayElements[e.TableControl.CurrentCell.RowIndex].ParentRecord;

            //If(rec) IsNot Nothing Then
            if (rec != null)
            {
                frmBehaviorDetail.PK = (int)(rec.GetValue("PK"));
                currentCellIndex     = e.TableControl.CurrentCell.RowIndex;
            }
        }
示例#4
0
        void gridGroupingControl1_TableControlCurrentCellShowedDropDown(object sender, GridTableControlEventArgs e)
        {
            GridTableDropDownListCellRenderer renderer = this.gridGroupingControl1.TableControl.CellRenderers["ForeignKeyCell"] as GridTableDropDownListCellRenderer;

            renderer.ListControlPart.Grid.GridOfficeScrollBars = OfficeScrollBars.Metro;
        }
示例#5
0
        private void gridGroupingControl1_TableControlCurrentCellActivated(object sender, GridTableControlEventArgs e)
        {
            // Navigate to ExtraSection when textbox inside ExtraSection has become CurrentCell.

            GridCurrentCell                gcc   = e.TableControl.CurrentCell;
            GridTableCellStyleInfo         style = e.TableControl.Model[gcc.RowIndex, gcc.ColIndex];
            GridTableCellStyleInfoIdentity id    = style.TableCellIdentity;

            if (id.DisplayElement is ExtraSection)
            {
                id.Table.CurrentRecordManager.NavigateTo(id.DisplayElement);
            }
        }