protected void OnAfterSelector(object sender, AfterSelectorEventArgs e)
 {
     if (AfterSelector != null)
     {
         AfterSelector(sender, e);
     }
 }
 //重写基类
 protected override void RaiseAfterSelector(object sender, AfterSelectorEventArgs e)
 {
     e.RowIndex    = this.dataGridView.CurrentCell.RowIndex;
     e.ColumnIndex = this.dataGridView.CurrentCell.ColumnIndex;
     e.Value       = e.Value;
     base.OnAfterSelector(sender, e);
 }
示例#3
0
        // DataGridView中dataCombo选择后事件处理(获取在下拉框中选择的数据)
        void SalePageAddOrEditForm_AfterSelector(object sender, AfterSelectorEventArgs e)
        {
            DataGridViewRow row     = e.Value as DataGridViewRow;
            DataRowView     dataRow = row.DataBoundItem as DataRowView;

            this.dataGridView1.Rows[e.RowIndex].Cells[0].Value = dataRow["title_id"].ToString().Trim();
            this.dataGridView1.Rows[e.RowIndex].Cells[1].Value = dataRow["title_id"].ToString().Trim();
            this.dataGridView1.Rows[e.RowIndex].Cells[2].Value = dataRow["title"].ToString().Trim();
            this.dataGridView1.Rows[e.RowIndex].Cells[3].Value = dataRow["type"].ToString().Trim();
            this.dataGridView1.Rows[e.RowIndex].Cells[4].Value = dataRow["price"].ToString().Trim();
            this.dataGridView1.Rows[e.RowIndex].Cells[5].Value = dataRow["ytd_sales"].ToString().Trim();;
            this.dataGridView1.Rows[e.RowIndex].Cells[6].Value = dataRow["notes"].ToString().Trim();;
            this.dataGridView1.Rows[e.RowIndex].Cells[7].Value = dataRow["pubdate"].ToString().Trim();;
        }
示例#4
0
        // 获取在下拉框中选择的数据
        void dataWindow1_AfterSelector(object sender, AfterSelectorEventArgs e)
        {
            ;
            DataGridViewRow row     = e.Value as DataGridViewRow;
            DataRowView     dataRow = row.DataBoundItem as DataRowView;

            int intRowIndex = this.dataGridView1.CurrentCell.RowIndex;

            this.dataGridView1.Rows[intRowIndex].Cells[0].Value = dataRow["title_id"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[2].Value = dataRow["title"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[3].Value = dataRow["type"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[4].Value = dataRow["price"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[5].Value = dataRow["ytd_sales"];
            this.dataGridView1.Rows[intRowIndex].Cells[6].Value = dataRow["notes"];
            this.dataGridView1.Rows[intRowIndex].Cells[7].Value = dataRow["pubdate"];
        }
 // DataGridView中dataCombo选择后事件处理(获取在下拉框中选择的数据)
 void SalePageAddOrEditForm_AfterSelector(object sender, AfterSelectorEventArgs e)
 {
     DataGridViewRow row = e.Value as DataGridViewRow;
     DataRowView dataRow = row.DataBoundItem as DataRowView;
     this.dataGridView1.Rows[e.RowIndex].Cells[0].Value = dataRow["title_id"].ToString().Trim();
     this.dataGridView1.Rows[e.RowIndex].Cells[1].Value = dataRow["title_id"].ToString().Trim();
     this.dataGridView1.Rows[e.RowIndex].Cells[2].Value = dataRow["title"].ToString().Trim();
     this.dataGridView1.Rows[e.RowIndex].Cells[3].Value = dataRow["type"].ToString().Trim();
     this.dataGridView1.Rows[e.RowIndex].Cells[4].Value = dataRow["price"].ToString().Trim();
     this.dataGridView1.Rows[e.RowIndex].Cells[5].Value = dataRow["ytd_sales"].ToString().Trim(); ;
     this.dataGridView1.Rows[e.RowIndex].Cells[6].Value = dataRow["notes"].ToString().Trim(); ;
     this.dataGridView1.Rows[e.RowIndex].Cells[7].Value = dataRow["pubdate"].ToString().Trim(); ;
 }
        // 获取在下拉框中选择的数据
        void dataWindow1_AfterSelector(object sender, AfterSelectorEventArgs e)
        {
            ;
            DataGridViewRow row = e.Value as DataGridViewRow;
            DataRowView dataRow = row.DataBoundItem as DataRowView;

            int intRowIndex = this.dataGridView1.CurrentCell.RowIndex;
            this.dataGridView1.Rows[intRowIndex].Cells[0].Value = dataRow["title_id"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[2].Value = dataRow["title"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[3].Value = dataRow["type"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[4].Value = dataRow["price"].ToString().Trim();
            this.dataGridView1.Rows[intRowIndex].Cells[5].Value = dataRow["ytd_sales"];
            this.dataGridView1.Rows[intRowIndex].Cells[6].Value = dataRow["notes"];
            this.dataGridView1.Rows[intRowIndex].Cells[7].Value = dataRow["pubdate"];
        }
 protected virtual void RaiseAfterSelector(object sender, AfterSelectorEventArgs e)
 {
     OnAfterSelector(sender, e);
 }
 protected void OnAfterSelector(object sender, AfterSelectorEventArgs e)
 {
     if (AfterSelector != null)
     {
         AfterSelector(sender, e);
     }
 }
 protected virtual void RaiseAfterSelector(object sender, AfterSelectorEventArgs e)
 {
     OnAfterSelector(sender, e);
 }
 //重写基类
 protected override void RaiseAfterSelector(object sender, AfterSelectorEventArgs e)
 {
     e.RowIndex = this.dataGridView.CurrentCell.RowIndex;
     e.ColumnIndex = this.dataGridView.CurrentCell.ColumnIndex;
     e.Value = e.Value;
     base.OnAfterSelector(sender, e);
 }