コード例 #1
0
ファイル: Form1.cs プロジェクト: telerik/winforms-sdk
            void button_Click(object sender, EventArgs e)
            {
                RadTextBox textBox = (RadTextBox)userControl.Controls["textBox"];

                if (this.RowInfo.Cells["TextBoxColumn"].Value != null)
                {
                    textBox.Text = this.RowInfo.Cells["TextBoxColumn"].Value.ToString();
                }
                else
                {
                    textBox.Text = String.Empty;
                }

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

                if (this.RowInfo.Cells["DateTimeColumn"].Value != null)
                {
                    dateTimePicker.Value = (DateTime)this.RowInfo.Cells["DateTimeColumn"].Value;
                }
                else
                {
                    dateTimePicker.SetToNullValue();
                }
            }