Beispiel #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();
            }
        }