DataGridTextBoxColumn コンストラクタ ()とは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridTextBoxColumn コンストラクタ ()の意味・解説 

DataGridTextBoxColumn コンストラクタ ()

DataGridTextBoxColumn クラス新しインスタンス初期化します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Dim instance As New DataGridTextBoxColumn
public DataGridTextBoxColumn ()
public:
DataGridTextBoxColumn ()
public DataGridTextBoxColumn ()
public function DataGridTextBoxColumn ()
使用例使用例

DataGridTextBoxColumn作成し、GridColumnStylesCollection コレクション追加する例を次に示します

Private Sub AddColumn()
    Dim myTable As New DataTable()
    
    ' Add a new DataColumn to the DataTable.
    Dim myColumn As New
 DataColumn("myTextBoxColumn")
    myColumn.DataType = System.Type.GetType("System.String")
    myColumn.DefaultValue = "default string"
    myTable.Columns.Add(myColumn)
    ' Get the CurrencyManager for the DataTable.
    Dim cm As CurrencyManager = CType(Me.BindingContext(myTable),
 CurrencyManager)
    ' Use the CurrencyManager to get the PropertyDescriptor for the
 new column.
    Dim pd As PropertyDescriptor = cm.GetItemProperties()("myTextBoxColumn")
    Dim myColumnTextColumn As DataGridTextBoxColumn
    ' Create the DataGridTextBoxColumn with the PropertyDescriptor.
    myColumnTextColumn = New DataGridTextBoxColumn(pd)
    ' Add the new DataGridColumn to the GridColumnsCollection.
    dataGrid1.DataSource = myTable
    dataGrid1.TableStyles.Add(New DataGridTableStyle())
    dataGrid1.TableStyles(0).GridColumnStyles.Add(myColumnTextColumn)
End Sub 'AddColumn
private void AddColumn()
{
     DataTable myTable= new DataTable();
 
     // Add a new DataColumn to the DataTable.
     DataColumn myColumn = new DataColumn("myTextBoxColumn");
     myColumn.DataType = System.Type.GetType("System.String");
     myColumn.DefaultValue="default string";
     myTable.Columns.Add(myColumn);
     // Get the CurrencyManager for the DataTable.
     CurrencyManager cm = (CurrencyManager)this.BindingContext[myTable];
     // Use the CurrencyManager to get the PropertyDescriptor for the
 new column.
     PropertyDescriptor pd = cm.GetItemProperties()["myTextBoxColumn"];
     DataGridTextBoxColumn myColumnTextColumn;
     // Create the DataGridTextBoxColumn with the PropertyDescriptor.
     myColumnTextColumn = new DataGridTextBoxColumn(pd);
     // Add the new DataGridColumn to the GridColumnsCollection.
     dataGrid1.DataSource= myTable;
     dataGrid1.TableStyles.Add(new DataGridTableStyle());
     dataGrid1.TableStyles[0].GridColumnStyles.Add(myColumnTextColumn);
 }

private:
   void AddColumn()
   {
      DataTable^ myTable = gcnew DataTable;
      
      // Add a new DataColumn to the DataTable.
      DataColumn^ myColumn = gcnew DataColumn( "myTextBoxColumn" );
      myColumn->DataType = System::Type::GetType( "System::String" );
      myColumn->DefaultValue = "default string";
      myTable->Columns->Add( myColumn );
      
      // Get the CurrencyManager for the DataTable.
      CurrencyManager^ cm = dynamic_cast<CurrencyManager^>(this->BindingContext[
 myTable ]);
      
      // Use the CurrencyManager to get the PropertyDescriptor for the
 new column.
      System::ComponentModel::PropertyDescriptor^ pd = cm->GetItemProperties()[
 "myTextBoxColumn" ];
      DataGridTextBoxColumn^ myColumnTextColumn;
      
      // Create the DataGridTextBoxColumn with the PropertyDescriptor.
      myColumnTextColumn = gcnew DataGridTextBoxColumn( pd );
      
      // Add the new DataGridColumn to the GridColumnsCollection.
      dataGrid1->DataSource = myTable;
      dataGrid1->TableStyles->Add( gcnew DataGridTableStyle );
      dataGrid1->TableStyles[ 0 ]->GridColumnStyles->Add( myColumnTextColumn
 );
   }

private void AddColumn()
{
    DataTable myTable = new DataTable();
    // Add a new DataColumn to the DataTable.
    DataColumn myColumn = new DataColumn("myTextBoxColumn");
    myColumn.set_DataType(System.Type.GetType("System.String"));
    myColumn.set_DefaultValue("default string");
    myTable.get_Columns().Add(myColumn);
    // Get the CurrencyManager for the DataTable.
    CurrencyManager cm = (CurrencyManager)(this.get_BindingContext().
        get_Item(myTable));
    // Use the CurrencyManager to get the PropertyDescriptor 
    // for the new column.
    PropertyDescriptor pd = cm.GetItemProperties().
        get_Item("myTextBoxColumn");
    DataGridTextBoxColumn myColumnTextColumn;

    // Create the DataGridTextBoxColumn with the PropertyDescriptor.
    myColumnTextColumn = new DataGridTextBoxColumn(pd);

    // Add the new DataGridColumn to the GridColumnsCollection.
    dataGrid1.set_DataSource(myTable);
    dataGrid1.get_TableStyles().Add(new DataGridTableStyle());
    dataGrid1.get_TableStyles().get_Item(0).
        get_GridColumnStyles().Add(myColumnTextColumn);
} //AddColumn
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridTextBoxColumn クラス
DataGridTextBoxColumn メンバ
System.Windows.Forms 名前空間
DataColumn
DataGridColumnStyle クラス
DataGrid クラス

DataGridTextBoxColumn コンストラクタ (PropertyDescriptor, Boolean)

PropertyDescriptor指定してDataGridTextBoxColumn クラス新しインスタンス初期化します。DataGridTextBoxColumn既定の列かどうか指定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Sub New ( _
    prop As PropertyDescriptor, _
    isDefault As Boolean _
)
Dim prop As PropertyDescriptor
Dim isDefault As Boolean

Dim instance As New DataGridTextBoxColumn(prop,
 isDefault)
public DataGridTextBoxColumn (
    PropertyDescriptor prop,
    bool isDefault
)
public:
DataGridTextBoxColumn (
    PropertyDescriptor^ prop, 
    bool isDefault
)
public DataGridTextBoxColumn (
    PropertyDescriptor prop, 
    boolean isDefault
)
public function DataGridTextBoxColumn (
    prop : PropertyDescriptor, 
    isDefault : boolean
)

パラメータ

prop

DataGridTextBoxColumn に関連付ける PropertyDescriptor。

isDefault

DataGridTextBoxColumn既定の列かどうか指定します

解説解説

DataGridColumnStyle は、列に表示されるデータの型を決定するために PropertyDescriptor使用します。PropertyDescriptorCollection を返すには、BindingManagerBase クラスの GetItemProperties メソッド使用します

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridTextBoxColumn クラス
DataGridTextBoxColumn メンバ
System.Windows.Forms 名前空間

DataGridTextBoxColumn コンストラクタ (PropertyDescriptor, String, Boolean)

指定した PropertyDescriptor と書式を使用してDataGridTextBoxColumn クラス新しインスタンス初期化します。列が既定の列かどうか指定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Sub New ( _
    prop As PropertyDescriptor, _
    format As String, _
    isDefault As Boolean _
)
Dim prop As PropertyDescriptor
Dim format As String
Dim isDefault As Boolean

Dim instance As New DataGridTextBoxColumn(prop,
 format, isDefault)
public DataGridTextBoxColumn (
    PropertyDescriptor prop,
    string format,
    bool isDefault
)
public:
DataGridTextBoxColumn (
    PropertyDescriptor^ prop, 
    String^ format, 
    bool isDefault
)
public DataGridTextBoxColumn (
    PropertyDescriptor prop, 
    String format, 
    boolean isDefault
)
public function DataGridTextBoxColumn (
    prop : PropertyDescriptor, 
    format : String, 
    isDefault : boolean
)

パラメータ

prop

DataGridTextBoxColumn に関連付ける PropertyDescriptor。

format

使用する書式

isDefault

DataGridTextBoxColumn既定の列かどうか指定します

解説解説

DataGridColumnStyle は、列に表示されるデータの型を決定するために PropertyDescriptor使用します。PropertyDescriptorCollection を返すには、BindingManagerBase クラスの GetItemProperties メソッド使用します

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridTextBoxColumn クラス
DataGridTextBoxColumn メンバ
System.Windows.Forms 名前空間

DataGridTextBoxColumn コンストラクタ (PropertyDescriptor)

PropertyDescriptor指定してDataGridTextBoxColumn新しインスタンス初期化します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Sub New ( _
    prop As PropertyDescriptor _
)
Dim prop As PropertyDescriptor

Dim instance As New DataGridTextBoxColumn(prop)
public DataGridTextBoxColumn (
    PropertyDescriptor prop
)
public:
DataGridTextBoxColumn (
    PropertyDescriptor^ prop
)
public DataGridTextBoxColumn (
    PropertyDescriptor prop
)
public function DataGridTextBoxColumn (
    prop : PropertyDescriptor
)

パラメータ

prop

DataGridTextBoxColumn が関連付けられる列の PropertyDescriptor。

解説解説

DataGridColumnStyle は、列に表示されるデータの型を決定するために PropertyDescriptor使用します。PropertyDescriptorCollection を返すには、BindingManagerBase クラスの GetItemProperties メソッド使用します

使用例使用例

DataGridTextBoxColumn作成し、GridColumnStylesCollection コレクション追加する例を次に示します

Private Sub AddColumn(myTable As
 DataTable)
    ' Add a new DataColumn to the DataTable.
    Dim myColumn As New
 DataColumn("myTextBoxColumn")
    myColumn.DataType = GetType(String)
    myColumn.DefaultValue = "default string"
    myTable.Columns.Add(myColumn)
    ' Get the ListManager for the DataTable.
    Dim cm As CurrencyManager = CType(Me.BindingContext(myTable),
 CurrencyManager)
    ' Use the ListManager to get the PropertyDescriptor for the new
 column.
    Dim pd As PropertyDescriptor = cm.GetItemProperties()("myTextBoxColumn")
    ' Create a new DataTimeFormat object.
    Dim fmt As New DateTimeFormatInfo()
    ' Insert code to set format.
    Dim myColumnTextColumn As DataGridTextBoxColumn
    ' Create the DataGridTextBoxColumn with the PropertyDescriptor and
 Format.
    myColumnTextColumn = New DataGridTextBoxColumn(pd, fmt.SortableDateTimePattern)
    ' Add the new DataGridColumnStyle to the GridColumnsCollection.
    dataGrid1.TableStyles(0).GridColumnStyles.Add(myColumnTextColumn)
End Sub 'AddColumn
private void AddColumn(DataTable myTable){
    // Add a new DataColumn to the DataTable.
    DataColumn myColumn = new DataColumn("myTextBoxColumn");
    myColumn.DataType = typeof(String);
    myColumn.DefaultValue="default string";
    myTable.Columns.Add(myColumn);
    // Get the ListManager for the DataTable.
    CurrencyManager cm = (CurrencyManager)this.BindingContext[myTable];
    // Use the ListManager to get the PropertyDescriptor for the new
 column.
    PropertyDescriptor pd = cm.GetItemProperties()["myTextBoxColumn"];
    // Create a new DataTimeFormat object.
    DateTimeFormatInfo fmt = new DateTimeFormatInfo();
    // Insert code to set format.
    DataGridTextBoxColumn myColumnTextColumn;
    // Create the DataGridTextBoxColumn with the PropertyDescriptor
 and Format.
    myColumnTextColumn = new DataGridTextBoxColumn(pd, fmt.SortableDateTimePattern);
    // Add the new DataGridColumnStyle to the GridColumnsCollection.
    dataGrid1.TableStyles[0].GridColumnStyles.Add(myColumnTextColumn);
 }

private:
   void AddColumn( DataTable^ myTable )
   {
      // Add a new DataColumn to the DataTable.
      DataColumn^ myColumn = gcnew DataColumn( "myTextBoxColumn" );
      myColumn->DataType = String::typeid;
      myColumn->DefaultValue = "default string";
      myTable->Columns->Add( myColumn );

      // Get the ListManager for the DataTable.
      CurrencyManager^ cm = dynamic_cast<CurrencyManager^>(this->BindingContext[
 myTable ]);

      // Use the ListManager to get the PropertyDescriptor for the new
 column.
      PropertyDescriptor^ pd = cm->GetItemProperties()[ "myTextBoxColumn"
 ];

      // Create a new DataTimeFormat object.
      DateTimeFormatInfo^ fmt = gcnew DateTimeFormatInfo;

      // Insert code to set format.
      DataGridTextBoxColumn^ myColumnTextColumn;

      // Create the DataGridTextBoxColumn with the PropertyDescriptor
 and Format.
      myColumnTextColumn = gcnew DataGridTextBoxColumn( pd,fmt->SortableDateTimePattern
 );

      // Add the new DataGridColumnStyle to the GridColumnsCollection.
      dataGrid1->TableStyles[ 0 ]->GridColumnStyles->Add( myColumnTextColumn
 );
   }
private void AddColumn(DataTable myTable)
{
    // Add a new DataColumn to the DataTable.
    DataColumn myColumn = new DataColumn("myTextBoxColumn");
    myColumn.set_DataType(String.class.ToType());
    myColumn.set_DefaultValue("default string");
    myTable.get_Columns().Add(myColumn);
    // Get the ListManager for the DataTable.
    CurrencyManager cM = (CurrencyManager)(this.get_BindingContext().
        get_Item(myTable));
    // Use the ListManager to get the PropertyDescriptor for the new
 column.
    PropertyDescriptor pd = cM.GetItemProperties().get_Item("myTextBoxColumn");
    // Create a new DataTimeFormat object.
    DateTimeFormatInfo fMt = new DateTimeFormatInfo();
    // Insert code to set format.
    DataGridTextBoxColumn myColumnTextColumn;
    // Create the DataGridTextBoxColumn with the PropertyDescriptor
 and Format.
    myColumnTextColumn = new DataGridTextBoxColumn(pd, fMt.
        get_SortableDateTimePattern());
    // Add the new DataGridColumnStyle to the GridColumnsCollection.
    dataGrid1.get_TableStyles().get_Item(0).get_GridColumnStyles().
        Add(myColumnTextColumn);
} //AddColumn
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridTextBoxColumn クラス
DataGridTextBoxColumn メンバ
System.Windows.Forms 名前空間
DataColumn
DataGridColumnStyle クラス
DataGrid クラス

DataGridTextBoxColumn コンストラクタ

DataGridTextBoxColumn クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
DataGridTextBoxColumn () DataGridTextBoxColumn クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

DataGridTextBoxColumn (PropertyDescriptor) PropertyDescriptor を指定してDataGridTextBoxColumn新しインスタンス初期化します。
DataGridTextBoxColumn (PropertyDescriptor, Boolean) PropertyDescriptor指定してDataGridTextBoxColumn クラス新しインスタンス初期化します。DataGridTextBoxColumn既定の列かどうか指定します
DataGridTextBoxColumn (PropertyDescriptor, String) PropertyDescriptor および書式指定してDataGridTextBoxColumn新しインスタンス初期化します。
DataGridTextBoxColumn (PropertyDescriptor, String, Boolean) 指定した PropertyDescriptor と書式を使用してDataGridTextBoxColumn クラス新しインスタンス初期化します。列が既定の列かどうか指定します
参照参照

関連項目

DataGridTextBoxColumn クラス
DataGridTextBoxColumn メンバ
System.Windows.Forms 名前空間
DataColumn
DataGridColumnStyle クラス
DataGrid クラス

DataGridTextBoxColumn コンストラクタ (PropertyDescriptor, String)

PropertyDescriptor および書式指定してDataGridTextBoxColumn新しインスタンス初期化します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Sub New ( _
    prop As PropertyDescriptor, _
    format As String _
)
Dim prop As PropertyDescriptor
Dim format As String

Dim instance As New DataGridTextBoxColumn(prop,
 format)
public DataGridTextBoxColumn (
    PropertyDescriptor prop,
    string format
)
public:
DataGridTextBoxColumn (
    PropertyDescriptor^ prop, 
    String^ format
)
public DataGridTextBoxColumn (
    PropertyDescriptor prop, 
    String format
)
public function DataGridTextBoxColumn (
    prop : PropertyDescriptor, 
    format : String
)

パラメータ

prop

DataGridTextBoxColumn が関連付けられる列の PropertyDescriptor。

format

列値の書式指定使用する書式

解説解説

表示されるデータカスタム書式作成するには、このコンストラクタ使用します

DataGridColumnStyle は、列に表示されるデータの型を決定するために PropertyDescriptor使用します。PropertyDescriptorCollection を返すには、BindingManagerBase クラスの GetItemProperties メソッド使用します

書式指定文字詳細については、「日付と時刻書式指定文字列」と「標準数値書式指定文字列」を参照してください

使用例使用例
Private Sub MyAddCustomDataTableStyle()
   ' Get the currency manager for 'myDataSet'.
   Dim myCurrencyManger As CurrencyManager
 = CType(Me.BindingContext(myDataSet), CurrencyManager)
   
   Dim myTableStyle As New
 DataGridTableStyle()
   myTableStyle.MappingName = "Customers"
   
   Dim proprtyDescriptorName As PropertyDescriptor
 = myCurrencyManger.GetItemProperties()("CustName")
   
   Dim myCustomerNameStyle As DataGridTextBoxColumn
 = New DataGridTextBoxColumn(proprtyDescriptorName)
   
   myCustomerNameStyle.MappingName = "custName"
   myCustomerNameStyle.HeaderText = "Customer Name"
   myTableStyle.GridColumnStyles.Add(myCustomerNameStyle)
   
   ' Add style for 'Date' column.
   Dim myDateDescriptor As PropertyDescriptor
 = myCurrencyManger.GetItemProperties()("Date")
   ' 'G' is for MM/dd/yyyy HH:mm:ss date format.
   Dim myDateStyle As DataGridTextBoxColumn
 = New DataGridTextBoxColumn(myDateDescriptor, "G")
   
   myDateStyle.MappingName = "Date"
   myDateStyle.HeaderText = "Date"
   myDateStyle.Width = 150
   myTableStyle.GridColumnStyles.Add(myDateStyle)
   
   ' Add DataGridTableStyle instances to GridTableStylesCollection.
   myDataGrid.TableStyles.Add(myTableStyle)
End Sub 'MyAddCustomDataTableStyle


private void MyAddCustomDataTableStyle()
{
   // Get the currency manager for 'myDataSet'.
   CurrencyManager myCurrencyManger =
            (CurrencyManager)this.BindingContext[myDataSet];

   DataGridTableStyle myTableStyle = new DataGridTableStyle();
   myTableStyle.MappingName = "Customers";

   PropertyDescriptor proprtyDescriptorName =
            myCurrencyManger.GetItemProperties()["CustName"];

   DataGridColumnStyle myCustomerNameStyle =
            new DataGridTextBoxColumn(proprtyDescriptorName);

   myCustomerNameStyle.MappingName = "custName";
   myCustomerNameStyle.HeaderText = "Customer Name";
   myTableStyle.GridColumnStyles.Add(myCustomerNameStyle);

   // Add style for 'Date' column.
   PropertyDescriptor myDateDescriptor =
            myCurrencyManger.GetItemProperties()["Date"];
   // 'G' is for MM/dd/yyyy HH:mm:ss date format.
   DataGridColumnStyle myDateStyle =
            new DataGridTextBoxColumn(myDateDescriptor,"G");

   myDateStyle.MappingName = "Date";
   myDateStyle.HeaderText = "Date";
   myDateStyle.Width = 150;
   myTableStyle.GridColumnStyles.Add(myDateStyle);

   // Add DataGridTableStyle instances to GridTableStylesCollection.
   myDataGrid.TableStyles.Add(myTableStyle);
}

private:
   void MyAddCustomDataTableStyle()
   {
      // Get the currency manager for 'myDataSet'.
      CurrencyManager^ myCurrencyManger = dynamic_cast<CurrencyManager^>(this->BindingContext[
 myDataSet ]);
      DataGridTableStyle^ myTableStyle = gcnew DataGridTableStyle;
      myTableStyle->MappingName = "Customers";
      PropertyDescriptor^ proprtyDescriptorName = myCurrencyManger->GetItemProperties()[
 "CustName" ];
      DataGridColumnStyle^ myCustomerNameStyle = gcnew DataGridTextBoxColumn( proprtyDescriptorName
 );
      myCustomerNameStyle->MappingName = "custName";
      myCustomerNameStyle->HeaderText = "Customer Name";
      myTableStyle->GridColumnStyles->Add( myCustomerNameStyle );

      // Add style for 'Date' column.
      PropertyDescriptor^ myDateDescriptor = myCurrencyManger->GetItemProperties()[
 "Date" ];

      // 'G' is for MM/dd/yyyy HH:mm:ss date format.
      DataGridColumnStyle^ myDateStyle = gcnew DataGridTextBoxColumn( myDateDescriptor,"G"
 );
      myDateStyle->MappingName = "Date";
      myDateStyle->HeaderText = "Date";
      myDateStyle->Width = 150;
      myTableStyle->GridColumnStyles->Add( myDateStyle );

      // Add DataGridTableStyle instances to GridTableStylesCollection.
      myDataGrid->TableStyles->Add( myTableStyle );
   }
private void MyAddCustomDataTableStyle()
{
    // Get the currency manager for 'myDataSet'.
    CurrencyManager myCurrencyManger = ((CurrencyManager)
        (this.get_BindingContext().get_Item(myDataSet)));
    DataGridTableStyle myTableStyle = new DataGridTableStyle();

    myTableStyle.set_MappingName("Customers");

    PropertyDescriptor proprtyDescriptorName = 
        myCurrencyManger.GetItemProperties().get_Item("CustName");
    DataGridColumnStyle myCustomerNameStyle = 
        new DataGridTextBoxColumn(proprtyDescriptorName);

    myCustomerNameStyle.set_MappingName("custName");
    myCustomerNameStyle.set_HeaderText("Customer Name");
    myTableStyle.get_GridColumnStyles().Add(myCustomerNameStyle);

    // Add style for 'Date' column.
    PropertyDescriptor myDateDescriptor = 
        myCurrencyManger.GetItemProperties().get_Item("Date");

    // 'G' is for MM/dd/yyyy HH:mm:ss date format.
    DataGridColumnStyle myDateStyle = 
        new DataGridTextBoxColumn(myDateDescriptor, "G");

    myDateStyle.set_MappingName("Date");
    myDateStyle.set_HeaderText("Date");
    myDateStyle.set_Width(150);
    myTableStyle.get_GridColumnStyles().Add(myDateStyle);

    // Add DataGridTableStyle instances to GridTableStylesCollection.
    myDataGrid.get_TableStyles().Add(myTableStyle);
} //MyAddCustomDataTableStyle
private void MyAddCustomDataTableStyle()
{
    // Get the currency manager for 'myDataSet'.
    CurrencyManager myCurrencyManger = ((CurrencyManager)
        (this.get_BindingContext().get_Item(myDataSet)));
    DataGridTableStyle myTableStyle = new DataGridTableStyle();

    myTableStyle.set_MappingName("Customers");

    PropertyDescriptor proprtyDescriptorName = 
        myCurrencyManger.GetItemProperties().get_Item("CustName");
    DataGridColumnStyle myCustomerNameStyle = 
        new DataGridTextBoxColumn(proprtyDescriptorName);

    myCustomerNameStyle.set_MappingName("custName");
    myCustomerNameStyle.set_HeaderText("Customer Name");
    myTableStyle.get_GridColumnStyles().Add(myCustomerNameStyle);

    // Add style for 'Date' column.
    PropertyDescriptor myDateDescriptor = 
        myCurrencyManger.GetItemProperties().get_Item("Date");

    // 'G' is for MM/dd/yyyy HH:mm:ss date format.
    DataGridColumnStyle myDateStyle = 
        new DataGridTextBoxColumn(myDateDescriptor, "G");

    myDateStyle.set_MappingName("Date");
    myDateStyle.set_HeaderText("Date");
    myDateStyle.set_Width(150);
    myTableStyle.get_GridColumnStyles().Add(myDateStyle);

    // Add DataGridTableStyle instances to GridTableStylesCollection.
    myDataGrid.get_TableStyles().Add(myTableStyle);
} //MyAddCustomDataTableStyle
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridTextBoxColumn クラス
DataGridTextBoxColumn メンバ
System.Windows.Forms 名前空間
DataColumn
DataGridColumnStyle クラス
DataGrid クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「DataGridTextBoxColumn コンストラクタ ()」の関連用語

DataGridTextBoxColumn コンストラクタ ()のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridTextBoxColumn コンストラクタ ()のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS