private void DrawElement_SortIndicatorUIElement(ref UIElementDrawParams drawParams)
        {
            SortIndicatorUIElement e = (SortIndicatorUIElement)drawParams.Element;

            global::Infragistics.Win.UltraWinGrid.ColumnHeader header = (global::Infragistics.Win.UltraWinGrid.ColumnHeader)e.GetContext(typeof(global::Infragistics.Win.UltraWinGrid.ColumnHeader));

            if (header.Column.SortIndicator == SortIndicator.Ascending)
            {
                drawParams.DrawImage(Properties.Resources.arrow_up_9, drawParams.Element.Rect, false, new ImageAttributes());
            }
            else if (header.Column.SortIndicator == SortIndicator.Descending)
            {
                drawParams.DrawImage(Properties.Resources.arrow_down_9, drawParams.Element.Rect, false, new ImageAttributes());
            }
        }
        private void DrawElement_RowSelectorUIElement(ref UIElementDrawParams drawParams)
        {
            Rectangle rect = drawParams.Element.Rect;

            rect.X += 1;

            UltraGridRow ultraGridRow = (UltraGridRow)drawParams.Element.GetContext(typeof(UltraGridRow));

            // active row header color
            if (ultraGridRow.IsActiveRow == true)
            {
                drawParams.AppearanceData.BackColor = CommonColorSet.ActiveCellHeaderColor;
            }

            drawParams.DrawBackColor(rect);
            drawParams.DrawBorders(UIElementBorderStyle.Solid, Border3DSide.Top | Border3DSide.Bottom | Border3DSide.Right, rect);

            // draw row number
            drawParams.DrawString(drawParams.Element.Rect, (ultraGridRow.VisibleIndex + 1).ToString(), false, false);

            // draw CRUD image. (DataRow Only)
            Rectangle imageRect = new Rectangle(rect.Left + 3, rect.Top + (ultraGridRow.Height - Properties.Resources.new_16.Height) / 2, Properties.Resources.new_16.Width, Properties.Resources.new_16.Height);

            // DataRowView 얻기
            DataRowView dataRowView = (DataRowView)ultraGridRow.ListObject;
            DataRow     dataRow     = dataRowView.Row;

            switch (dataRow.RowState)
            {
            case DataRowState.Added:
                drawParams.DrawImage(Properties.Resources.new_16, imageRect, false, null);
                break;

            case DataRowState.Modified:
                drawParams.DrawImage(Properties.Resources.edit_16, imageRect, false, null);
                break;

            case DataRowState.Deleted:
                drawParams.DrawImage(Properties.Resources.delete_16, imageRect, false, null);
                break;
            }
        }
        private void DrawElement_EditorWithComboDropDownButtonUIElement(ref UIElementDrawParams drawParams)
        {
            EditorWithComboDropDownButtonUIElement dropDownButtonElement = (EditorWithComboDropDownButtonUIElement)drawParams.Element;

            if (dropDownButtonElement.Parent is EditorWithComboUIElement)
            {
                EditorWithComboUIElement comboElement = (EditorWithComboUIElement)dropDownButtonElement.Parent;
                UltraGridCell            cell         = (UltraGridCell)comboElement.SelectableItem;
                UltraGridColumn          column       = cell.Column;

                if (this.grid.IsCellEditable(cell) == true)
                {
                    if (dropDownButtonElement.IsHotTracked == true)
                    {
                        drawParams.AppearanceData.BackColor = Color.FromArgb(230, 230, 230);
                        drawParams.DrawBackColor(drawParams.Element.Rect);
                        drawParams.DrawImage(Properties.Resources.button_code_hover, this.GetDropDownButtonRect(drawParams), false, null);
                        drawParams.DrawBorders(UIElementBorderStyle.Solid, Border3DSide.Left);
                    }
                    else
                    {
                        drawParams.AppearanceData.BackColor = Color.FromArgb(215, 215, 215);
                        drawParams.DrawBackColor(drawParams.Element.Rect);
                        drawParams.DrawImage(Properties.Resources.button_code_normal, this.GetDropDownButtonRect(drawParams), false, null);
                        drawParams.DrawBorders(UIElementBorderStyle.Solid, Border3DSide.Left);
                    }
                }
                else
                {
                    drawParams.AppearanceData.BackColor = Color.FromArgb(180, 180, 180);
                    drawParams.DrawBackColor(drawParams.Element.Rect);
                    drawParams.DrawImage(Properties.Resources.button_code_normal, this.GetDropDownButtonRect(drawParams), false, null);
                    drawParams.DrawBorders(UIElementBorderStyle.Solid, Border3DSide.Left);
                }
            }
        }
 private void DrawElement_FilterDropDownButtonUIElement(ref UIElementDrawParams drawParams)
 {
     drawParams.DrawImage(Properties.Resources.filter_12, drawParams.Element.Rect, false, new ImageAttributes());
 }