本文整理汇总了C#中System.Windows.Forms.DataGridViewBindingCompleteEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DataGridViewBindingCompleteEventArgs类的具体用法?C# DataGridViewBindingCompleteEventArgs怎么用?C# DataGridViewBindingCompleteEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataGridViewBindingCompleteEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了DataGridViewBindingCompleteEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: R_008_Employee_Current_On_Line_MasterDatabase_GridView_DataBindingComplete
void R_008_Employee_Current_On_Line_MasterDatabase_GridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
string plan_empl, tracking_empl;
foreach (DataGridViewRow row in R_008_Employee_Current_On_Line_MasterDatabase.MasterDatabase_GridviewTBL.GridView.Rows)
{
plan_empl = row.Cells["Plan_Empl_ID"].Value == null ? "" : row.Cells["Plan_Empl_ID"].Value.ToString().Trim();
tracking_empl = row.Cells["Empl_ID"].Value == null ? "" : row.Cells["Empl_ID"].Value.ToString().Trim();
if (plan_empl == "")
{
if (tracking_empl != "")
{
row.DefaultCellStyle.BackColor = Color.Yellow;
}
else
{
row.DefaultCellStyle.BackColor = Color.Orange;
}
}
else
{
if (tracking_empl == "")
{
row.DefaultCellStyle.BackColor = Color.Red;
}
}
}
}
开发者ID:anthanhcong,项目名称:atc-demand-instruction-form,代码行数:27,代码来源:R_008_Employee_Current_On_Line_Init.cs
示例2: MoonDataGridView_DataBindingComplete
private void MoonDataGridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
if (SortColumnIndex != null)
{
this.Sort(this.Columns[SortColumnIndex.Value], SortDerection);
}
}
示例3: dataGridViewActiveListing_DataBindingComplete
private void dataGridViewActiveListing_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
if (e.ListChangedType == ListChangedType.ItemChanged)
return;
for (int rowIdx = 0; rowIdx < this.dataGridViewActiveListing.Rows.Count; ++rowIdx)
{
DataGridViewCell listingTypeCell = this.dataGridViewActiveListing.Rows[rowIdx].Cells[ActiveListing_ListingTypeColIdx];
if (listingTypeCell.Value == null)
continue;
String listingType = listingTypeCell.Value.ToString();
if (listingType != "Auction")
continue;
DataGridViewCell bidCntCell = this.dataGridViewActiveListing.Rows[rowIdx].Cells[ActiveListing_BidCntColIdx];
if (bidCntCell.Value == null)
continue;
int bidCnt = 0;
if (!Int32.TryParse(bidCntCell.Value.ToString(), out bidCnt))
continue;
if (bidCnt > 0)
this.dataGridViewActiveListing.Rows[rowIdx].DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#90EE90");
}
}
示例4: _logDataGridView_DataBindingComplete
private void _logDataGridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
foreach (DataGridViewRow row in _logDataGridView.Rows)
{
Icon icon = Properties.Resources.TransparentIcon;
string toolTip = null;
LogEntry logEntry = row.DataBoundItem as LogEntry;
if (logEntry != null)
{
toolTip = logEntry.LogSeverity.ToString();
switch (logEntry.LogSeverity)
{
case LogSeverity.Error:
case LogSeverity.Fatal:
icon = Resources.LogError;
break;
case LogSeverity.Warning:
icon = Resources.LogWarning;
break;
case LogSeverity.Information:
icon = Resources.LogInformation;
break;
}
}
row.Cells[0].Value = icon;
row.Cells[0].ToolTipText = toolTip;
}
}
示例5: dgClassSchedule_DataBindingComplete
private void dgClassSchedule_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
for (int i = 0; i < dgClassSchedule.Rows.Count; i++)
{
var classNumber = i + 1;
var weekDay = 0;
foreach (DataGridViewComboBoxCell cell in dgClassSchedule.Rows[i].Cells.OfType<DataGridViewComboBoxCell>())
{
weekDay++;
var filteredProfessors = _professorDatalayer.GetForScheduling((DayOfWeek)weekDay, classNumber, Convert.ToInt32(lstClassrooms.SelectedValue));
if (!filteredProfessors.Any(p => p.Id == 0))
filteredProfessors.Add(new Professor() { Id = 0, Name = "Vaga" });
var currentValue = Convert.ToInt32(cell.Value);
if (!filteredProfessors.Any(p => p.Id == currentValue))
{
var currentProfessor = _professorsList.Where(p => p.Id == currentValue).Single();
filteredProfessors.Add(currentProfessor);
}
cell.DataSource = filteredProfessors;
cell.DisplayMember = "Name";
cell.ValueType = typeof(int);
cell.ValueMember = "Id";
}
}
}
示例6: OnDataBindingComplete
protected override void OnDataBindingComplete(DataGridViewBindingCompleteEventArgs e)
{
base.OnDataBindingComplete(e);
SetupComponent();
listRowBitmaps = new List<Bitmap>(new Bitmap[this.Rows.Count]);
_DataBindingDate = DateTime.Now;
}
示例7: R_006_TrackingTT_PlanTL_Control_MasterDatabase_GridView_DataBindingComplete
void R_006_TrackingTT_PlanTL_Control_MasterDatabase_GridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
string plan_empl, his_empl_id;
try
{
foreach (DataGridViewRow row in R_006_TrackingTT_PlanTL_MasterDatabase.MasterDatabase_GridviewTBL.GridView.Rows)
{
// kiem tra plan và history giong nhau khong
plan_empl = row.Cells["Plan_Empl_ID"].Value == null ? "" : row.Cells["Plan_Empl_ID"].Value.ToString().Trim();
his_empl_id = row.Cells["His_Empl_ID"].Value == null ? "" : row.Cells["His_Empl_ID"].Value.ToString().Trim();
if (his_empl_id == "")
{
row.DefaultCellStyle.BackColor = Color.LightSeaGreen;
}
else if (plan_empl == "")
{
row.DefaultCellStyle.BackColor = Color.LightBlue;
}
else if (plan_empl != his_empl_id)
{
row.DefaultCellStyle.BackColor = Color.Red;
}
}
}
catch
{
}
}
示例8: OnDataBindingComplete
protected override void OnDataBindingComplete(DataGridViewBindingCompleteEventArgs e)
{
base.OnDataBindingComplete(e);
for (int i = 0; i < invisibleColumnRow.Count; i++)
{
this[invisibleColumnRow[i].X, invisibleColumnRow[i].Y].ReadOnly = true;
}
}
示例9: dataGridView1_DataBindingComplete
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
foreach (DataGridViewRow item in dataGridView1.Rows)
{
item.Cells["Candidate_birthday"].Value =DateTime.Now.Year - (item.DataBoundItem as humanresourcesDataSet.vw_resume_candidateRow).Candidate_birthday.Year;
item.Cells["Candidate_sex"].Value = (item.DataBoundItem as humanresourcesDataSet.vw_resume_candidateRow).Candidate_sex == 1 ? "男" : "女";
}
}
示例10: dataGridView1_DataBindingComplete
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
foreach (DataGridViewColumn column in dataGridView1.Columns)
{
// ヘッダーをTweetVKeysの表記に差し替える
column.HeaderText = Program.TweetVKeys[((DataTable)dataGridView1.DataSource).Columns[column.Index].Caption];
}
}
示例11: dataGridView1_DataBindingComplete
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
dataGridView1.RowHeadersWidth = 60;
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
int j = i + 1;
dataGridView1.Rows[i].HeaderCell.Value = j.ToString();
}
}
示例12: dataGridView1_DataBindingComplete
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
DataGridViewImageCell cell = (DataGridViewImageCell)dataGridView1.Rows[i].Cells[0];
cell.Value = QYClient.Properties.Resources.ResourceManager.GetObject("icon" + dataGridView1.Rows[i].Cells["iconId"].Value.ToString());
cell.OwningRow.Height = 120;
}
}
示例13: DataGridViewX1DataBindingComplete
private void DataGridViewX1DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
var gridView = (DataGridViewX)sender;
if (null == gridView) return;
foreach (DataGridViewRow r in gridView.Rows)
{
gridView.Rows[r.Index].HeaderCell.Value = (r.Index + 1).ToString();
}
}
示例14: dataGridView1_DataBindingComplete
private void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
foreach (DataGridViewRow item in dataGridView1.Rows)
{
humanresourcesDataSet.vw_recommended_state_remarkRow i = (item.DataBoundItem as DataRowView).Row as humanresourcesDataSet.vw_recommended_state_remarkRow;
item.Cells[0].Value = i.recommended_state_remark_Time.ToLongDateString() + "由" + i.User_realName + "更改状态为" + i.Recommended_State_Name;
item.Cells[1].Value = i.recommended_state_remark_content;
}
}
示例15: ProjectsDataGridView_DataBindingComplete
void ProjectsDataGridView_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
ProjectsDataGridView.Columns[0].Width = 20;
foreach (DataGridViewRow row in ProjectsDataGridView.Rows)
{
row.Cells[0].Value = true;
}
}