當前位置: 首頁>>代碼示例>>C#>>正文


C# Forms.DataGridViewBindingCompleteEventArgs類代碼示例

本文整理匯總了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);
     }
 }
開發者ID:kissstudio,項目名稱:Topawes,代碼行數:7,代碼來源:MoonDataGridView.cs

示例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");
            }
        }
開發者ID:Richmandos,項目名稱:ebaymaster,代碼行數:27,代碼來源:FrmMainPartial_ActiveListing.cs

示例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;
            }

        }
開發者ID:Christoph21x,項目名稱:ARGUS-TV,代碼行數:31,代碼來源:LogListControl.cs

示例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";
                }
            }
        }
開發者ID:rafmsou,項目名稱:WeekClassSchedule,代碼行數:28,代碼來源:FrmWeekClassSchedule.cs

示例6: OnDataBindingComplete

 protected override void OnDataBindingComplete(DataGridViewBindingCompleteEventArgs e)
 {
     base.OnDataBindingComplete(e);
     SetupComponent();
     listRowBitmaps = new List<Bitmap>(new Bitmap[this.Rows.Count]);
     _DataBindingDate = DateTime.Now;
 }
開發者ID:japj,項目名稱:bidshelper,代碼行數:7,代碼來源:DtsGanttGrid.cs

示例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
            {

            }
        }
開發者ID:anthanhcong,項目名稱:atc-demand-instruction-form,代碼行數:29,代碼來源:R_006_TrackingTT_PlanTL_Control.cs

示例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;
     }
 }
開發者ID:Heimiko,項目名稱:NzbSearcher,代碼行數:8,代碼來源:frmConfig.cs

示例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 ? "男" : "女";
     }
 }
開發者ID:watxy77,項目名稱:MarkTest,代碼行數:8,代碼來源:FrmCandidateSearchSemple.cs

示例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];
     }
 }
開發者ID:nahc-ak,項目名稱:TweetKeyPress,代碼行數:8,代碼來源:MainForm.cs

示例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();
     }
 }
開發者ID:wuyanqing,項目名稱:wc001,代碼行數:9,代碼來源:allinformation.cs

示例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;
     }
 }
開發者ID:ufjl0683,項目名稱:Center,代碼行數:9,代碼來源:FrmIcons.cs

示例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();
     }
 }
開發者ID:kiemhieu,項目名稱:medicine-website,代碼行數:9,代碼來源:CheckOnDate.cs

示例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;
     }
 }
開發者ID:watxy77,項目名稱:MarkTest,代碼行數:9,代碼來源:FrmRecommendedPrc.cs

示例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;

            }
        }
開發者ID:vebin,項目名稱:LINQBridgeVs,代碼行數:10,代碼來源:ProjectDependencies.cs


注:本文中的System.Windows.Forms.DataGridViewBindingCompleteEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。