Ejemplo n.º 1
0
        void DisplayUITable(DataSourceUITable uitable)
        {
            int  rowIdx      = 0;
            int  colIdx      = 0;
            bool skipThisCol = false;

            foreach (UIColumn col in uitable.DataColumns)
            {
                if (skipThisCol)
                {
                    skipThisCol = false;
                    colIdx++;
                    continue;
                }

                TableRow row = this.elementLayoutDesigner1.AddRow();
                if (colIdx + 1 < uitable.DataColumns.Count - 1)
                {
                    UIColumn nextCol = (UIColumn)uiTable.DataColumns[colIdx + 1];
                    if (col.CtrlType != ControlType.Hidden && nextCol.CtrlType != ControlType.Hidden && col.CtrlType != ControlType.Textarea && nextCol.CtrlType != ControlType.Textarea)
                    {
                        row.AddTableCells(2);

                        this.elementLayoutDesigner1.SelectCell(rowIdx, 0);
                        PropertyPage ctrl = CreatePropertyPageFromUIColumn(col);
                        this.elementLayoutDesigner1.AddElement(ctrl);

                        this.elementLayoutDesigner1.SelectCell(rowIdx, 1);
                        PropertyPage nextCtrl = CreatePropertyPageFromUIColumn(nextCol);
                        this.elementLayoutDesigner1.AddElement(nextCtrl);

                        skipThisCol = true;
                    }
                    else
                    {
                        row.AddTableCells(1);
                        this.elementLayoutDesigner1.SelectCell(rowIdx, 0);
                        PropertyPage ctrl = CreatePropertyPageFromUIColumn(col);
                        this.elementLayoutDesigner1.AddElement(ctrl);
                    }
                }
                else
                {
                    row.AddTableCells(1);
                    this.elementLayoutDesigner1.SelectCell(rowIdx, 0);
                    PropertyPage ctrl = CreatePropertyPageFromUIColumn(col);
                    this.elementLayoutDesigner1.AddElement(ctrl);
                }
                colIdx++;
                rowIdx++;
            }
        }
Ejemplo n.º 2
0
        void DisplayGrid(DataSourceUITable uiTable)
        {
            TableRow row = this.elementLayoutDesigner1.AddRow();

            row.AddTableCells(1);
            this.elementLayoutDesigner1.SelectCell(0, 0);

            PropertyPage ctrl = CreateGridPropertyPage(uiTable);

            this.elementLayoutDesigner1.AddElement(ctrl);
        }