示例#1
0
 private void DgOrders_QueryRowStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventArgs e)
 {
     if (e.RowType == RowType.DefaultRow)
     {
         if ((e.RowData as OrderApi).Status == Status.Solicitado)
         {
             e.Style.BackColor = Color.LightCyan;
         }
         else if ((e.RowData as OrderApi).Status == Status.En_Pausa)
         {
             e.Style.BackColor = Color.OrangeRed;
         }
         else if ((e.RowData as OrderApi).Status == Status.En_Revision)
         {
             e.Style.BackColor = Color.Yellow;
         }
         else if ((e.RowData as OrderApi).Status == Status.En_Armado)
         {
             e.Style.BackColor = Color.YellowGreen;
         }
         else if ((e.RowData as OrderApi).Status == Status.En_Ruta)
         {
             e.Style.BackColor = Color.DeepSkyBlue;
         }
         else if ((e.RowData as OrderApi).Status == Status.Entregado)
         {
             e.Style.BackColor = Color.GreenYellow;
         }
     }
 }
 void ChildDataGrid_QueryRowStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventArgs e)
 {
     if (e.RowType == Syncfusion.WinForms.DataGrid.Enums.RowType.DefaultRow)
     {
         if (e.RowIndex % 2 == 0)
         {
             e.Style.BackColor = Color.Yellow;
         }
         else
         {
             e.Style.BackColor = Color.LightGreen;
         }
     }
 }
示例#3
0
 private void dgPartitions_QueryRowStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventArgs e)
 {
     if (e.RowData is PartitionInfo p)
     {
         if (p.State != "Processed" || p.Disabled)
         {
             e.Style.BackColor = Color.FromArgb(255, 192, 192);
         }
         else if (p.State == "Processed")
         {
             e.Style.BackColor = Color.FromArgb(192, 255, 192);
         }
     }
 }
示例#4
0
 private void gridAccounts_QueryRowStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventArgs e)
 {
     if (e.RowType == RowType.DefaultRow)
     {
         if ((e.RowData as AccountEntry).GroupingCategory.Equals("GR".ToAccountGroupCatDesc()))
         {
             e.Style.Font.Bold = true;
             e.Style.BackColor = ColorTranslator.FromHtml("#ebebe0");
         }
         else if ((e.RowData as AccountEntry).GroupingCategory.Equals("GA".ToAccountGroupCatDesc()))
         {
             e.Style.Font.Bold = true;
         }
     }
 }
 void ParentDataGrid_QueryRowStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventArgs e)
 {
     if (sfDataGrid1.DetailsViewDefinitions.Count > 0)
     {
         if (e.RowType == Syncfusion.WinForms.DataGrid.Enums.RowType.DefaultRow)
         {
             if ((e.RowIndex / (sfDataGrid1.DetailsViewDefinitions.Count + 1)) % 2 == 0)
             {
                 e.Style.BackColor = Color.LightGreen;
             }
             else
             {
                 e.Style.BackColor = Color.Yellow;
             }
         }
     }
 }
示例#6
0
        private void sdgTools_QueryRowStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventArgs e)
        {
            if (DesignMode)
            {
                return;
            }
            if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
            {
                return;
            }

            var d = (Models.Tool)sdgTools.GetRecordAtRowIndex(e.RowIndex);

            if (d == null)
            {
                return;
            }

            if (d.Status.Equals(ToolStatus.Unknown.ToString()))
            {
                e.Style.TextColor = Color.Black;
                e.Style.BackColor = Color.White;
            }
            else if (d.Status.Equals(ToolStatus.Working.ToString()))
            {
                e.Style.TextColor = Color.White;
                e.Style.BackColor = Color.Green;
            }
            else if (d.Status.Equals(ToolStatus.NotWorking.ToString()))
            {
                e.Style.TextColor = Color.White;
                e.Style.BackColor = Color.Red;
            }
            else if (d.Status.Equals(ToolStatus.Checking.ToString()))
            {
                e.Style.TextColor = Color.White;
                e.Style.BackColor = Color.DodgerBlue;
            }
        }