예제 #1
0
        private void UpdateGridInfo(GridViewRowInfo currentRow)
        {
            if (currentRow == null)
            {
                return;
            }

            this.radGridView1.CloseEditor();

            currentRow.Cells["ProductName"].Value  = this.radTextBoxProductName.Text;
            currentRow.Cells["Manufacturer"].Value = this.radTextBoxManufacturer.Text;
            currentRow.Cells["Lining"].Value       = this.radTextBoxMaterial.Text;
            currentRow.Cells["Dimensions"].Value   = this.radTextBoxDimension.Text;

            if (this.radComboBox1.SelectedIndex != -1)
            {
                currentRow.Cells["SalesRepresentative"].Value = this.radComboBox1.SelectedItem.Text;
            }

            GridViewNewRowInfo newRowInfo = currentRow as GridViewNewRowInfo;

            if (newRowInfo != null)
            {
                currentRow.InvalidateRow();
            }
            else
            {
                ((IEditableObject)this.radGridView1.CurrentRow.DataBoundItem).EndEdit();
            }
        }
예제 #2
0
        private void UpdateGridInfo(GridViewRowInfo currentRow)
        {
            if (currentRow == null)
            {
                return;
            }

            radGridView1.CloseEditor();
            UpdateWorkerInDB(currentRow);
            GridViewNewRowInfo newRowInfo = currentRow as GridViewNewRowInfo;

            if (newRowInfo != null)
            {
                currentRow.InvalidateRow();
            }
        }
예제 #3
0
            void saveButton_Click(object sender, EventArgs e)
            {
                RadTextBox textBox = (RadTextBox)this.userControl.Controls["textBox"];

                this.RowInfo.Cells["TextBoxColumn"].Value = textBox.Text;

                RadDateTimePicker dateTimePicker = (RadDateTimePicker)this.userControl.Controls["dateTimePicker"];

                if (dateTimePicker.Value != dateTimePicker.NullDate)
                {
                    this.RowInfo.Cells["DateTimeColumn"].Value = dateTimePicker.Value;
                }

                //add new row
                GridViewNewRowInfo newRow = this.RowInfo as GridViewNewRowInfo;

                if (newRow != null)
                {
                    newRow.EndAddNewRow();
                }

                this.button.DropDownMenu.ClosePopup(RadPopupCloseReason.AppFocusChange);
            }