2013-10-03 10 views

답변

2

당신이 원하는대로 텍스트 중 하나 DataGridViewCell 또는 DataGridViewColumnToolTipText 속성을 설정합니다.

2

각 셀은 그 셀의 the .ToolTipText property 설정 툴 팁을 가질 수있다. 이런 식으로 뭔가가 :

// Event for formatting cells when rendering the grid 
void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) 
{ 
    // Some logic for determining which cell this is in the row 
    if ((e.ColumnIndex == this.dataGridView1.Columns["SomeColumn"].Index)) 
    { 
     // Get a reference to the cell 
     DataGridViewCell cell = this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex]; 

     // Set the tooltip text 
     cell.ToolTipText = "some text"; 
    } 
} 
관련 문제