DataGridTableStyle Класс
Определение
public ref class DataGridTableStyle : System::ComponentModel::Component, System::Windows::Forms::IDataGridEditingService
public class DataGridTableStyle : System.ComponentModel.Component, System.Windows.Forms.IDataGridEditingService
type DataGridTableStyle = class
inherit Component
interface IDataGridEditingService
Public Class DataGridTableStyle
Inherits Component
Implements IDataGridEditingService
- Наследование
- Реализации
Примеры
В следующем примере кода создаются два DataGridTableStyle экземпляра и задается MappingName для каждого объекта в объекте TableName DataTable в DataSet .The following code example creates two DataGridTableStyle instances and sets the MappingName of each object to the TableName of a DataTable in a DataSet. Затем в примере добавляются DataGridColumnStyle объекты для GridColumnStylesCollection каждого из них DataGridTableStyle .The example then adds DataGridColumnStyle objects to the GridColumnStylesCollection of each DataGridTableStyle. Пример, который выполняется, см. в System.Windows.Forms.DataGrid примере.For an example that runs, see the System.Windows.Forms.DataGrid example.
void AddCustomDataTableStyle()
{
/* Create a new DataGridTableStyle and set
its MappingName to the TableName of a DataTable. */
DataGridTableStyle^ ts1 = gcnew DataGridTableStyle;
ts1->MappingName = "Customers";
/* Add a GridColumnStyle and set its MappingName
to the name of a DataColumn in the DataTable.
Set the HeaderText and Width properties. */
DataGridColumnStyle^ boolCol = gcnew DataGridBoolColumn;
boolCol->MappingName = "Current";
boolCol->HeaderText = "IsCurrent Customer";
boolCol->Width = 150;
ts1->GridColumnStyles->Add( boolCol );
// Add a second column style.
DataGridColumnStyle^ TextCol = gcnew DataGridTextBoxColumn;
TextCol->MappingName = "custName";
TextCol->HeaderText = "Customer Name";
TextCol->Width = 250;
ts1->GridColumnStyles->Add( TextCol );
// Create the second table style with columns.
DataGridTableStyle^ ts2 = gcnew DataGridTableStyle;
ts2->MappingName = "Orders";
// Change the colors.
ts2->ForeColor = Color::Yellow;
ts2->AlternatingBackColor = Color::Blue;
ts2->BackColor = Color::Blue;
// Create new DataGridColumnStyle objects.
DataGridColumnStyle^ cOrderDate = gcnew DataGridTextBoxColumn;
cOrderDate->MappingName = "OrderDate";
cOrderDate->HeaderText = "Order Date";
cOrderDate->Width = 100;
ts2->GridColumnStyles->Add( cOrderDate );
PropertyDescriptorCollection^ pcol = this->BindingContext[ myDataSet,"Customers.custToOrders" ]->GetItemProperties();
DataGridColumnStyle^ csOrderAmount = gcnew DataGridTextBoxColumn( pcol[ "OrderAmount" ],"c",true );
csOrderAmount->MappingName = "OrderAmount";
csOrderAmount->HeaderText = "Total";
csOrderAmount->Width = 100;
ts2->GridColumnStyles->Add( csOrderAmount );
// Add the DataGridTableStyle objects to the collection.
myDataGrid->TableStyles->Add( ts1 );
myDataGrid->TableStyles->Add( ts2 );
}
private void AddCustomDataTableStyle()
{
/* Create a new DataGridTableStyle and set
its MappingName to the TableName of a DataTable. */
DataGridTableStyle ts1 = new DataGridTableStyle();
ts1.MappingName = "Customers";
/* Add a GridColumnStyle and set its MappingName
to the name of a DataColumn in the DataTable.
Set the HeaderText and Width properties. */
DataGridColumnStyle boolCol = new DataGridBoolColumn();
boolCol.MappingName = "Current";
boolCol.HeaderText = "IsCurrent Customer";
boolCol.Width = 150;
ts1.GridColumnStyles.Add(boolCol);
// Add a second column style.
DataGridColumnStyle TextCol = new DataGridTextBoxColumn();
TextCol.MappingName = "custName";
TextCol.HeaderText = "Customer Name";
TextCol.Width = 250;
ts1.GridColumnStyles.Add(TextCol);
// Create the second table style with columns.
DataGridTableStyle ts2 = new DataGridTableStyle();
ts2.MappingName = "Orders";
// Change the colors.
ts2.ForeColor = Color.Yellow;
ts2.AlternatingBackColor = Color.Blue;
ts2.BackColor = Color.Blue;
// Create new DataGridColumnStyle objects.
DataGridColumnStyle cOrderDate =
new DataGridTextBoxColumn();
cOrderDate.MappingName = "OrderDate";
cOrderDate.HeaderText = "Order Date";
cOrderDate.Width = 100;
ts2.GridColumnStyles.Add(cOrderDate);
PropertyDescriptorCollection pcol = this.BindingContext
[myDataSet, "Customers.custToOrders"].GetItemProperties();
DataGridColumnStyle csOrderAmount =
new DataGridTextBoxColumn(pcol["OrderAmount"], "c", true);
csOrderAmount.MappingName = "OrderAmount";
csOrderAmount.HeaderText = "Total";
csOrderAmount.Width = 100;
ts2.GridColumnStyles.Add(csOrderAmount);
// Add the DataGridTableStyle objects to the collection.
myDataGrid.TableStyles.Add(ts1);
myDataGrid.TableStyles.Add(ts2);
}
Private Sub AddCustomDataTableStyle()
' Create a new DataGridTableStyle and set
' its MappingName to the TableName of a DataTable.
Dim ts1 As New DataGridTableStyle()
ts1.MappingName = "Customers"
' Add a GridColumnStyle and set its MappingName
' to the name of a DataColumn in the DataTable.
' Set the HeaderText and Width properties.
Dim boolCol As New DataGridBoolColumn()
boolCol.MappingName = "Current"
boolCol.HeaderText = "IsCurrent Customer"
boolCol.Width = 150
ts1.GridColumnStyles.Add(boolCol)
' Add a second column style.
Dim TextCol As New DataGridTextBoxColumn()
TextCol.MappingName = "custName"
TextCol.HeaderText = "Customer Name"
TextCol.Width = 250
ts1.GridColumnStyles.Add(TextCol)
' Create the second table style with columns.
Dim ts2 As New DataGridTableStyle()
ts2.MappingName = "Orders"
' Change the colors.
ts2.ForeColor = Color.Yellow
ts2.AlternatingBackColor = Color.Blue
ts2.BackColor = Color.Blue
' Create new DataGridColumnStyle objects.
Dim cOrderDate As New DataGridTextBoxColumn()
cOrderDate.MappingName = "OrderDate"
cOrderDate.HeaderText = "Order Date"
cOrderDate.Width = 100
ts2.GridColumnStyles.Add(cOrderDate)
Dim pcol As PropertyDescriptorCollection = Me.BindingContext(myDataSet, "Customers.custToOrders").GetItemProperties()
Dim csOrderAmount As New DataGridTextBoxColumn(pcol("OrderAmount"), "c", True)
csOrderAmount.MappingName = "OrderAmount"
csOrderAmount.HeaderText = "Total"
csOrderAmount.Width = 100
ts2.GridColumnStyles.Add(csOrderAmount)
' Add the DataGridTableStyle objects to the collection.
myDataGrid.TableStyles.Add(ts1)
myDataGrid.TableStyles.Add(ts2)
End Sub
Комментарии
System.Windows.Forms.DataGridЭлемент управления отображает данные в виде сетки.The System.Windows.Forms.DataGrid control displays data in the form of a grid. DataGridTableStyle— Это класс, представляющий только отрисованную сетку.The DataGridTableStyle is a class that represents the drawn grid only. Эту сетку не следует путать с DataTable классом, который является возможным источником данных для сетки.This grid should not be confused with the DataTable class, which is a possible source of data for the grid. Вместо этого DataGridTableStyle строго представляет сетку в том виде, в котором она закрашивается в элементе управления.Instead, the DataGridTableStyle strictly represents the grid as it is painted in the control. Таким образом, с помощью можно DataGridTableStyle управлять внешним видом сетки для каждого из них DataTable .Therefore, through the DataGridTableStyle you can control the appearance of the grid for each DataTable. Чтобы указать, какой параметр DataGridTableStyle используется при отображении данных из определенного DataTable объекта, задайте для значение свойства MappingName TableName DataTable .To specify which DataGridTableStyle is used when displaying data from a particular DataTable, set the MappingName to the TableName of a DataTable.
Объект, GridTableStylesCollection полученный с помощью TableStyles свойства, содержит все DataGridTableStyle объекты, используемые System.Windows.Forms.DataGrid элементом управления.The GridTableStylesCollection retrieved through the TableStyles property contains all the DataGridTableStyle objects used by a System.Windows.Forms.DataGrid control. Коллекция может содержать столько DataGridTableStyle объектов, сколько требуется, однако MappingName каждый из них должен быть уникальным.The collection can contain as many DataGridTableStyle objects as you need, however the MappingName of each must be unique. Во время выполнения это позволяет заменить DataGridTableStyle одни и те же данные в зависимости от предпочтений пользователя.At run time, this allows you to substitute a different DataGridTableStyle for the same data, depending on the user's preference. Выполните указанные ниже действия.To do this:
Заполните GridTableStylesCollection DataGridTableStyle объекты объектами.Populate the GridTableStylesCollection with DataGridTableStyle objects. Если DataGridTableStyle свойство существует в GridTableStylesCollection MappingName свойстве, значение которого равно DataTable TableName свойству объекта, то DataTable отображается с этим объектом DataGridTableStyle .If a DataGridTableStyle exists in the GridTableStylesCollection whose MappingName property value equals the DataTable object's TableName property, the DataTable is displayed with this DataGridTableStyle. Если DataGridTableStyle с соответствующим именем не существует MappingName , DataTable отображается с использованием стиля по умолчанию для таблиц сетки данных.If no DataGridTableStyle exists with a matching MappingName, the DataTable is displayed with the default style for data grid tables.
Если требуется другой стиль сетки, используйте
Item
свойство, чтобы выбрать соответствующий параметр DataGridTableStyle (передать в TableName Item[] свойство) и присвоить MappingName возвращаемому объекту новое значение.When a different grid style is needed, use theItem
property to select the appropriate DataGridTableStyle (pass the TableName to the Item[] property) and set the MappingName of the returned object to a new value.Используйте Item[] свойство, чтобы выбрать нужное значение DataGridTableStyle , и задайте для него значение свойства MappingName TableName DataTable .Use the Item[] property to select the desired DataGridTableStyle, and set its MappingName to the TableName of the DataTable.
Внимание!
Всегда создавайте DataGridColumnStyle объекты и добавляйте их в, GridColumnStylesCollection прежде чем добавлять DataGridTableStyle объекты в GridTableStylesCollection .Always create DataGridColumnStyle objects and add them to the GridColumnStylesCollection before adding DataGridTableStyle objects to the GridTableStylesCollection. При добавлении DataGridTableStyle в коллекцию пустого значения с допустимым MappingName значением объекты создаются DataGridColumnStyle автоматически.When you add an empty DataGridTableStyle with a valid MappingName value to the collection, DataGridColumnStyle objects are automatically generated for you. Следовательно, при попытке добавления новых DataGridColumnStyle объектов с повторяющимися значениями в объект возникнет исключение MappingName GridColumnStylesCollection .Consequently, an exception will be thrown if you try to add new DataGridColumnStyle objects with duplicate MappingName values to the GridColumnStylesCollection.
Чтобы определить DataGridTableStyle , какие в настоящий момент отображаются, DataSource Используйте DataMember Свойства и объекта, System.Windows.Forms.DataGrid чтобы получить CurrencyManager .To determine which DataGridTableStyle is currently displayed, use the DataSource and DataMember properties of the System.Windows.Forms.DataGrid to return a CurrencyManager. Если источник данных реализует ITypedList интерфейс, можно использовать GetListName метод для возврата MappingName текущей таблицы.If the data source implements the ITypedList interface, you can use the GetListName method to return the MappingName of the current table. Это показано в следующем коде C#:This is shown in the C# code below:
private void PrintCurrentListName(DataGrid myDataGrid){
CurrencyManager myCM = (CurrencyManager)
BindingContext[myDataGrid.DataSource, myDataGrid.DataMember];
IList myList = myCM.List;
ITypedList thisList = (ITypedList) myList;
Console.WriteLine(thisList.GetListName(null));
}
Если объект DataSet содержит DataTable объекты, связанные через DataRelation объекты, а отображаемый в данный момент объект DataTable является дочерней таблицей, функция вернет DataMember строку в виде TableName. релатионнаме (в самом простом случае).If the DataSet contains DataTable objects related through DataRelation objects, and the currently displayed DataTable is a child table, the DataMember will return a string in the form of TableName.RelationName (in the simplest case). Если объект DataTable находится дальше в иерархии, строка будет состоять из имени родительской таблицы, за которым следуют необходимые значения, RelationName необходимые для достижения уровня таблицы.If the DataTable is further down in the hierarchy, the string will consist of the parent table's name followed by the necessary RelationName values required to reach the table's level. Например, представьте три DataTable объекта в иерархической связи с именами (сверху вниз) Regions
, Customers
, и и Orders
два DataRelation объекта с именем RegionsToCustomers
и CustomersToOrders
, DataMember свойство будет возвращать "regions. регионстокустомерс. кустомерстурдерс".For example, imagine three DataTable objects in a hierarchical relationship named (top to bottom) Regions
, Customers
, and Orders
, and two DataRelation objects named RegionsToCustomers
and CustomersToOrders
, the DataMember property will return "Regions.RegionsToCustomers.CustomersToOrders". Тем не менее, MappingName затем будет «Orders».However, the MappingName will then be "Orders".
Коллекция DataGridTableStyle объектов возвращается через TableStyles свойство объекта System.Windows.Forms.DataGrid .The collection of DataGridTableStyle objects is returned through the TableStyles property of the System.Windows.Forms.DataGrid.
Если DataGridTableStyle отображается, параметры для DataGridTableStyle элемента управления будут переопределены System.Windows.Forms.DataGrid .When a DataGridTableStyle is displayed, the settings for the DataGridTableStyle will override the settings for the System.Windows.Forms.DataGrid control. Если значение не задано для конкретного DataGridTableStyle свойства, System.Windows.Forms.DataGrid вместо него будет использоваться значение элемента управления.If a value is not set for a particular DataGridTableStyle property, the System.Windows.Forms.DataGrid control's value will be used instead. В следующем списке показаны DataGridColumnStyle свойства, которые можно задать для переопределения System.Windows.Forms.DataGrid свойств элемента управления:The following list shows the DataGridColumnStyle properties that can be set to override System.Windows.Forms.DataGrid control properties:
Для привязки DataGrid к строго типизированному массиву объектов тип объекта должен содержать открытые свойства.To bind the DataGrid to a strongly typed array of objects, the object type must contain public properties. Чтобы создать объект DataGridTableStyle , отображающий массив, установите DataGridTableStyle.MappingName для свойства значение typename
WHERE, которое typename
заменяется именем типа объекта.To create a DataGridTableStyle that displays the array, set the DataGridTableStyle.MappingName property to typename
where typename
is replaced by the name of the object type. Также обратите внимание, что в MappingName свойстве учитывается регистр; имя типа должно точно совпадать.Also note that the MappingName property is case-sensitive; the type name must be matched exactly. Пример см MappingName . в свойстве.See the MappingName property for an example.
Можно также привязать DataGrid к ArrayList .You can also bind the DataGrid to an ArrayList. Функция в заключается в том ArrayList , что она может содержать объекты нескольких типов, но DataGrid может быть привязана только к такому списку, только если все элементы в списке имеют тот же тип, что и первый элемент.A feature of the ArrayList is that it can contain objects of multiple types, but the DataGrid can only bind to such a list when all items in the list are of the same type as the first item. Это означает, что все объекты должны быть одного типа или наследоваться от того же класса, что и первый элемент в списке.This means that all objects must either be of the same type, or they must inherit from the same class as the first item in the list. Например, если первый элемент в списке — Control , то второй элемент может быть объектом TextBox (который наследуется от Control ).For example, if the first item in a list is a Control, the second item could be a TextBox (which inherits from Control). Если, с другой стороны, первый элемент — TextBox , второй объект не может быть Control .If, on the other hand, the first item is a TextBox, the second object cannot be a Control. Кроме того, элемент ArrayList должен содержать в нем элементы, если он привязан, а объекты в DataGridTableStyle должны иметь открытые свойства.Further, the ArrayList must have items in it when it is bound and the objects in the DataGridTableStyle must contain public properties. Пустая ArrayList Сетка приведет к пустой сетке.An empty ArrayList will result in an empty grid. При привязке к ArrayList присвойте свойству значение MappingName DataGridTableStyle ArrayList (имя типа).When binding to an ArrayList, set the MappingName of the DataGridTableStyle to "ArrayList" (the type name).
Конструкторы
DataGridTableStyle() |
Инициализирует новый экземпляр класса DataGridTableStyle.Initializes a new instance of the DataGridTableStyle class. |
DataGridTableStyle(Boolean) |
Инициализирует новый экземпляр класса DataGridTableStyle, используя заданное значение, чтобы определить, применен ли для таблицы стиль по умолчанию.Initializes a new instance of the DataGridTableStyle class using the specified value to determine whether the grid table is the default style. |
DataGridTableStyle(CurrencyManager) |
Инициализирует новый экземпляр класса DataGridTableStyle указанным значением CurrencyManager.Initializes a new instance of the DataGridTableStyle class with the specified CurrencyManager. |
Поля
DefaultTableStyle |
Получает стиль таблицы по умолчанию.Gets the default table style. |
Свойства
AllowSorting |
Указывает, разрешена ли сортировка в таблице, когда используется DataGridTableStyle.Indicates whether sorting is allowed on the grid table when this DataGridTableStyle is used. |
AlternatingBackColor |
Получает или задает цвет фона строк сетки с нечетными номерами.Gets or sets the background color of odd-numbered rows of the grid. |
BackColor |
Получает или задает цвет фона строк сетки с четными номерами.Gets or sets the background color of even-numbered rows of the grid. |
CanRaiseEvents |
Возвращает значение, показывающее, может ли компонент вызывать событие.Gets a value indicating whether the component can raise an event. (Унаследовано от Component) |
ColumnHeadersVisible |
Получает или задает значение, показывающее, являются ли заголовки столбцов видимыми.Gets or sets a value indicating whether column headers are visible. |
Container |
Возвращает объект IContainer, который содержит коллекцию Component.Gets the IContainer that contains the Component. (Унаследовано от Component) |
DataGrid |
Получает или задает элемент управления DataGrid для нарисованной таблицы.Gets or sets the DataGrid control for the drawn table. |
DesignMode |
Возвращает значение, указывающее, находится ли данный компонент Component в режиме конструктора в настоящее время.Gets a value that indicates whether the Component is currently in design mode. (Унаследовано от Component) |
Events |
Возвращает список обработчиков событий, которые прикреплены к этому объекту Component.Gets the list of event handlers that are attached to this Component. (Унаследовано от Component) |
ForeColor |
Получает или задает основной цвет таблицы.Gets or sets the foreground color of the grid table. |
GridColumnStyles |
Получает коллекцию столбцов, нарисованных для данной таблицы.Gets the collection of columns drawn for this table. |
GridLineColor |
Получает или задает цвет линий сетки.Gets or sets the color of grid lines. |
GridLineStyle |
Получает или задает стиль линий сетки.Gets or sets the style of grid lines. |
HeaderBackColor |
Получает или задает цвет фона заголовков.Gets or sets the background color of headers. |
HeaderFont |
Получает или задает шрифт, используемый для названий заголовка.Gets or sets the font used for header captions. |
HeaderForeColor |
Получает или задает основной цвет заголовков.Gets or sets the foreground color of headers. |
LinkColor |
Получает или задает цвет текста ссылки.Gets or sets the color of link text. |
LinkHoverColor |
Получает или задает цвет, который отображается при наведении указателя мыши на текст ссылки.Gets or sets the color displayed when hovering over link text. |
MappingName |
Получает или задает имя, используемое для связывания этой таблицы с некоторым источником данных.Gets or sets the name used to map this table to a specific data source. |
PreferredColumnWidth |
Получает или задает ширину, используемую для создания столбцов при отображении новой сетки.Gets or sets the width used to create columns when a new grid is displayed. |
PreferredRowHeight |
Получает или задает высоту, используемую для создания строк при отображении новой сетки.Gets or sets the height used to create a row when a new grid is displayed. |
ReadOnly |
Получает или задает значение, показывающее, разрешено ли редактирование столбцов.Gets or sets a value indicating whether columns can be edited. |
RowHeadersVisible |
Получает или задает значение, показывающее, видимы ли заголовки строк.Gets or sets a value indicating whether row headers are visible. |
RowHeaderWidth |
Получает или задает ширину заголовков строк.Gets or sets the width of row headers. |
SelectionBackColor |
Получает или задает цвет фона выбранных ячеек.Gets or sets the background color of selected cells. |
SelectionForeColor |
Получает или задает основной цвет выбранных ячеек.Gets or sets the foreground color of selected cells. |
Site |
Получает или задает ISite объекта Component.Gets or sets the ISite of the Component. (Унаследовано от Component) |
Методы
BeginEdit(DataGridColumnStyle, Int32) |
Запрашивает операцию редактирования.Requests an edit operation. |
CreateGridColumn(PropertyDescriptor) |
Создает DataGridColumnStyle с помощью заданного дескриптора свойства.Creates a DataGridColumnStyle, using the specified property descriptor. |
CreateGridColumn(PropertyDescriptor, Boolean) |
Создает DataGridColumnStyle с помощью заданного дескриптора свойства.Creates a DataGridColumnStyle using the specified property descriptor. Определяет, является ли DataGridColumnStyle стилем столбца по умолчанию.Specifies whether the DataGridColumnStyle is a default column style. |
CreateObjRef(Type) |
Создает объект, который содержит всю необходимую информацию для создания прокси-сервера, используемого для взаимодействия с удаленным объектом.Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Унаследовано от MarshalByRefObject) |
Dispose() |
Освобождает все ресурсы, занятые модулем Component.Releases all resources used by the Component. (Унаследовано от Component) |
Dispose(Boolean) |
Уничтожает ресурсы (кроме памяти), используемые классом DataGridTableStyle.Disposes of the resources (other than memory) used by the DataGridTableStyle. |
EndEdit(DataGridColumnStyle, Int32, Boolean) |
Запрашивает окончание операции редактирования.Requests an end to an edit operation. |
Equals(Object) |
Определяет, равен ли указанный объект текущему объекту.Determines whether the specified object is equal to the current object. (Унаследовано от Object) |
GetHashCode() |
Служит хэш-функцией по умолчанию.Serves as the default hash function. (Унаследовано от Object) |
GetLifetimeService() |
Является устаревшей.
Извлекает объект обслуживания во время существования, который управляет политикой времени существования данного экземпляра.Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Унаследовано от MarshalByRefObject) |
GetService(Type) |
Возвращает объект, представляющий службу, предоставляемую классом Component или классом Container.Returns an object that represents a service provided by the Component or by its Container. (Унаследовано от Component) |
GetType() |
Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance. (Унаследовано от Object) |
InitializeLifetimeService() |
Является устаревшей.
Получает объект службы времени существования для управления политикой времени существования для этого экземпляра.Obtains a lifetime service object to control the lifetime policy for this instance. (Унаследовано от MarshalByRefObject) |
MemberwiseClone() |
Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object. (Унаследовано от Object) |
MemberwiseClone(Boolean) |
Создает неполную копию текущего объекта MarshalByRefObject.Creates a shallow copy of the current MarshalByRefObject object. (Унаследовано от MarshalByRefObject) |
OnAllowSortingChanged(EventArgs) |
Вызывает событие AllowSortingChanged.Raises the AllowSortingChanged event. |
OnAlternatingBackColorChanged(EventArgs) |
Вызывает событие AlternatingBackColorChanged.Raises the AlternatingBackColorChanged event. |
OnBackColorChanged(EventArgs) |
Вызывает событие BackColorChanged.Raises the BackColorChanged event. |
OnColumnHeadersVisibleChanged(EventArgs) |
Вызывает событие ColumnHeadersVisibleChanged.Raises the ColumnHeadersVisibleChanged event. |
OnForeColorChanged(EventArgs) |
Вызывает событие ForeColorChanged.Raises the ForeColorChanged event. |
OnGridLineColorChanged(EventArgs) |
Вызывает событие GridLineColorChanged.Raises the GridLineColorChanged event. |
OnGridLineStyleChanged(EventArgs) |
Вызывает событие GridLineStyleChanged.Raises the GridLineStyleChanged event. |
OnHeaderBackColorChanged(EventArgs) |
Вызывает событие HeaderBackColorChanged.Raises the HeaderBackColorChanged event. |
OnHeaderFontChanged(EventArgs) |
Вызывает событие HeaderFontChanged.Raises the HeaderFontChanged event. |
OnHeaderForeColorChanged(EventArgs) |
Вызывает событие HeaderForeColorChanged.Raises the HeaderForeColorChanged event. |
OnLinkColorChanged(EventArgs) |
Вызывает событие LinkColorChanged.Raises the LinkColorChanged event. |
OnLinkHoverColorChanged(EventArgs) |
Вызывает событие |
OnMappingNameChanged(EventArgs) |
Вызывает событие MappingNameChanged.Raises the MappingNameChanged event. |
OnPreferredColumnWidthChanged(EventArgs) |
Вызывает событие PreferredColumnWidthChanged.Raises the PreferredColumnWidthChanged event. |
OnPreferredRowHeightChanged(EventArgs) |
Вызывает событие PreferredRowHeightChanged.Raises the PreferredRowHeightChanged event. |
OnReadOnlyChanged(EventArgs) |
Вызывает событие ReadOnlyChanged.Raises the ReadOnlyChanged event. |
OnRowHeadersVisibleChanged(EventArgs) |
Вызывает событие RowHeadersVisibleChanged.Raises the RowHeadersVisibleChanged event. |
OnRowHeaderWidthChanged(EventArgs) |
Вызывает событие RowHeaderWidthChanged.Raises the RowHeaderWidthChanged event. |
OnSelectionBackColorChanged(EventArgs) |
Вызывает событие SelectionBackColorChanged.Raises the SelectionBackColorChanged event. |
OnSelectionForeColorChanged(EventArgs) |
Вызывает событие SelectionForeColorChanged.Raises the SelectionForeColorChanged event. |
ResetAlternatingBackColor() |
Восстанавливает значение по умолчанию свойства AlternatingBackColor.Resets the AlternatingBackColor property to its default value. |
ResetBackColor() |
Восстанавливает значение по умолчанию свойства BackColor.Resets the BackColor property to its default value. |
ResetForeColor() |
Восстанавливает значение по умолчанию свойства ForeColor.Resets the ForeColor property to its default value. |
ResetGridLineColor() |
Восстанавливает значение по умолчанию свойства GridLineColor.Resets the GridLineColor property to its default value. |
ResetHeaderBackColor() |
Восстанавливает значение по умолчанию свойства HeaderBackColor.Resets the HeaderBackColor property to its default value. |
ResetHeaderFont() |
Восстанавливает значение по умолчанию свойства HeaderFont.Resets the HeaderFont property to its default value. |
ResetHeaderForeColor() |
Восстанавливает значение по умолчанию свойства HeaderForeColor.Resets the HeaderForeColor property to its default value. |
ResetLinkColor() |
Восстанавливает значение по умолчанию свойства LinkColor.Resets the LinkColor property to its default value. |
ResetLinkHoverColor() |
Восстанавливает значение по умолчанию свойства LinkHoverColor.Resets the LinkHoverColor property to its default value. |
ResetSelectionBackColor() |
Восстанавливает значение по умолчанию свойства SelectionBackColor.Resets the SelectionBackColor property to its default value. |
ResetSelectionForeColor() |
Восстанавливает значение по умолчанию свойства SelectionForeColor.Resets the SelectionForeColor property to its default value. |
ShouldSerializeAlternatingBackColor() |
Определяет необходимость сохранения значения свойства AlternatingBackColor.Indicates whether the AlternatingBackColor property should be persisted. |
ShouldSerializeBackColor() |
Определяет необходимость сохранения значения свойства BackColor.Indicates whether the BackColor property should be persisted. |
ShouldSerializeForeColor() |
Определяет необходимость сохранения значения свойства ForeColor.Indicates whether the ForeColor property should be persisted. |
ShouldSerializeGridLineColor() |
Определяет необходимость сохранения значения свойства GridLineColor.Indicates whether the GridLineColor property should be persisted. |
ShouldSerializeHeaderBackColor() |
Определяет необходимость сохранения значения свойства HeaderBackColor.Indicates whether the HeaderBackColor property should be persisted. |
ShouldSerializeHeaderForeColor() |
Определяет необходимость сохранения значения свойства HeaderForeColor.Indicates whether the HeaderForeColor property should be persisted. |
ShouldSerializeLinkColor() |
Определяет необходимость сохранения значения свойства LinkColor.Indicates whether the LinkColor property should be persisted. |
ShouldSerializeLinkHoverColor() |
Определяет необходимость сохранения значения свойства LinkHoverColor.Indicates whether the LinkHoverColor property should be persisted. |
ShouldSerializePreferredRowHeight() |
Определяет необходимость сохранения значения свойства PreferredRowHeight.Indicates whether the PreferredRowHeight property should be persisted. |
ShouldSerializeSelectionBackColor() |
Определяет необходимость сохранения значения свойства SelectionBackColor.Indicates whether the SelectionBackColor property should be persisted. |
ShouldSerializeSelectionForeColor() |
Определяет необходимость сохранения значения свойства SelectionForeColor.Indicates whether the SelectionForeColor property should be persisted. |
ToString() |
Возвращает объект String, содержащий имя Component, если оно есть.Returns a String containing the name of the Component, if any. Этот метод не следует переопределять.This method should not be overridden. (Унаследовано от Component) |
События
AllowSortingChanged |
Происходит при изменении значения свойства AllowSorting.Occurs when the AllowSorting property value changes. |
AlternatingBackColorChanged |
Происходит при изменении значения свойства AlternatingBackColor.Occurs when the AlternatingBackColor value changes. |
BackColorChanged |
Происходит при изменении значения свойства BackColor.Occurs when the BackColor value changes. |
ColumnHeadersVisibleChanged |
Происходит при изменении значения свойства ColumnHeadersVisible.Occurs when the ColumnHeadersVisible value changes. |
Disposed |
Возникает при удалении компонента путем вызова метода Dispose().Occurs when the component is disposed by a call to the Dispose() method. (Унаследовано от Component) |
ForeColorChanged |
Происходит при изменении значения свойства ForeColor.Occurs when the ForeColor value changes. |
GridLineColorChanged |
Происходит при изменении значения свойства GridLineColor.Occurs when the GridLineColor value changes. |
GridLineStyleChanged |
Происходит при изменении значения свойства GridLineStyle.Occurs when the GridLineStyle value changes. |
HeaderBackColorChanged |
Происходит при изменении значения свойства HeaderBackColor.Occurs when the HeaderBackColor value changes. |
HeaderFontChanged |
Происходит при изменении значения свойства HeaderFont.Occurs when the HeaderFont value changes. |
HeaderForeColorChanged |
Происходит при изменении значения свойства HeaderForeColor.Occurs when the HeaderForeColor value changes. |
LinkColorChanged |
Происходит при изменении значения свойства LinkColor.Occurs when the LinkColor value changes. |
LinkHoverColorChanged |
Происходит при изменении значения свойства LinkHoverColor.Occurs when the LinkHoverColor value changes. |
MappingNameChanged |
Происходит при изменении значения свойства MappingName.Occurs when the MappingName value changes. |
PreferredColumnWidthChanged |
Происходит при изменении значения свойства PreferredColumnWidth.Occurs when the PreferredColumnWidth property value changes. |
PreferredRowHeightChanged |
Происходит при изменении значения свойства PreferredRowHeight.Occurs when the PreferredRowHeight value changes. |
ReadOnlyChanged |
Происходит при изменении значения свойства ReadOnly.Occurs when the ReadOnly value changes. |
RowHeadersVisibleChanged |
Происходит при изменении значения свойства RowHeadersVisible.Occurs when the RowHeadersVisible value changes. |
RowHeaderWidthChanged |
Происходит при изменении значения свойства RowHeaderWidth.Occurs when the RowHeaderWidth value changes. |
SelectionBackColorChanged |
Происходит при изменении значения свойства SelectionBackColor.Occurs when the SelectionBackColor value changes. |
SelectionForeColorChanged |
Происходит при изменении значения свойства SelectionForeColor.Occurs when the SelectionForeColor value changes. |