Пример #1
0
            public string GetCellDataAsString(long nRowIndex, int nColIndex)
            {
                GridDataRow row = this.mData[(int)nRowIndex];

                switch (nColIndex)
                {
                case 2:
                    return(row.Text);

                case 3:
                    return(row.DropDownText);

                case 4:
                    return(row.DropDownListText);

                case 5:
                    return(string.Format("{0}", row.SpinValue));

                case 6:
                    return(row.HyperLinkText);

                case 7:
                    return(row.ButtonText);

                default:
                    return(string.Format("Col: {0}, Row: {1}", nColIndex, nRowIndex));
                }
            }
Пример #2
0
            public void GetCellDataForButton(long nRowIndex, int nColIndex, out ButtonCellState state, out Bitmap image, out string buttonLabel)
            {
                GridDataRow row = this.mData[(int)nRowIndex];

                state       = ButtonCellState.Normal;
                image       = null;
                buttonLabel = row.ButtonText;
            }
Пример #3
0
            public void FillControlWithData(long nRowIndex, int nColIndex, IGridEmbeddedControl control)
            {
                GridDataRow row = this.mData[(int)nRowIndex];

                switch (nColIndex)
                {
                case 2:
                {
                    EmbeddedTextBox textBox = control as EmbeddedTextBox;
                    textBox.Text = row.Text;
                }
                break;

                case 3:
                {
                    EmbeddedComboBox comboBox = control as EmbeddedComboBox;
                    for (int i = 0; i < (int)this.NumRows(); i++)
                    {
                        comboBox.AddDataAsString(string.Format("Dropdown: {0}", i));
                    }
                    comboBox.Text = row.DropDownText;
                }
                break;

                case 4:
                {
                    EmbeddedComboBox comboBox = control as EmbeddedComboBox;
                    for (int i = 0; i < (int)this.NumRows(); i++)
                    {
                        comboBox.AddDataAsString(string.Format("DropDownList: {0}", i));
                    }

                    comboBox.SelectedItem = row.DropDownListText;
                }
                break;

                case 5:
                {
                    EmbeddedSpinBox spinBox = control as EmbeddedSpinBox;
                    spinBox.Value = row.SpinValue;
                }
                break;

                default:
                    break;
                }
            }
Пример #4
0
            public GridCheckBoxState GetCellDataForCheckBox(long nRowIndex, int nColIndex)
            {
                GridDataRow row = this.mData[(int)nRowIndex];

                return(row.IsChecked ? GridCheckBoxState.Checked : GridCheckBoxState.Unchecked);
            }
Пример #5
0
            public Bitmap GetCellDataAsBitmap(long nRowIndex, int nColIndex)
            {
                GridDataRow row = this.mData[(int)nRowIndex];

                return(row.Image);
            }