DataGridTableStyle.DataGrid Свойство
Определение
public:
virtual property System::Windows::Forms::DataGrid ^ DataGrid { System::Windows::Forms::DataGrid ^ get(); void set(System::Windows::Forms::DataGrid ^ value); };
[System.ComponentModel.Browsable(false)]
public virtual System.Windows.Forms.DataGrid DataGrid { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.DataGrid : System.Windows.Forms.DataGrid with get, set
Public Overridable Property DataGrid As DataGrid
Значение свойства
Элемент управления DataGrid, в котором отображается таблица.The DataGrid control that displays the table.
- Атрибуты
Примеры
В следующем примере кода выводится CurrentCell System.Windows.Forms.DataGrid Отображение объекта DataGridTableStyle .The following code example prints the CurrentCell of the System.Windows.Forms.DataGrid displaying a DataGridTableStyle.
private:
void GetSelectedIndex( DataGridTableStyle^ myGridTable )
{
/* Get the name of the DataGrid of the DataGridTable
passed as an argument. */
Console::WriteLine( myGridTable->DataGrid->CurrentCell.ToString() );
}
private void GetSelectedIndex(DataGridTableStyle myGridTable)
{
/* Get the name of the DataGrid of the DataGridTable
passed as an argument. */
Console.WriteLine(myGridTable.DataGrid.CurrentCell.ToString());
}
Private Sub GetSelectedIndex(myGridTable As DataGridTableStyle)
' Get the name of the DataGrid of the DataGridTable
' passed as an argument.
Console.WriteLine(myGridTable.DataGrid.CurrentCell.ToString())
End Sub
Комментарии
System.Windows.Forms.DataGridЭлемент управления отображает данные в виде сетки.The System.Windows.Forms.DataGrid control displays data in the form of a grid. DataGridTableStyle— Это объект, представляющий рисуемую сетку.The DataGridTableStyle is an object that represents the drawn grid. System.Windows.Forms.DataGridСвойство возвращает ссылку на элемент управления, который отображает сетку.The System.Windows.Forms.DataGrid property returns a reference to the control that is displaying the grid.
DataGridСвойство задается, когда DataGridTableStyle добавляется в System.Windows.Forms.DataGrid элемент управления GridTableStylesCollection .The DataGrid property is set when a DataGridTableStyle is added to a System.Windows.Forms.DataGrid control's GridTableStylesCollection. Не пытайтесь установить это свойство, если вы не переопределяете его и создаете конструктор для пользовательского элемента управления, который включает DataGrid элемент управления.You should not try to set this property unless you are overriding it and creating a designer for a user control that incorporates the DataGrid control.