DataGridColumnStyle.MappingNameChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the MappingName value changes.
public:
event EventHandler ^ MappingNameChanged;
public event EventHandler MappingNameChanged;
member this.MappingNameChanged : EventHandler
Public Custom Event MappingNameChanged As EventHandler
Event Type
Examples
The following code example demonstrates the use of this member.
private:
void AddCustomColumnStyle()
{
DataGridTableStyle^ myTableStyle = gcnew DataGridTableStyle;
myTableStyle->MappingName = "Orders";
myColumnStyle = gcnew DataGridTextBoxColumn;
myColumnStyle->MappingName = "Orders";
myColumnStyle->HeaderText = "Orders";
myTableStyle->GridColumnStyles->Add( myColumnStyle );
myDataGrid->TableStyles->Add( myTableStyle );
myColumnStyle->MappingNameChanged += gcnew EventHandler( this, &MyForm::columnStyle_MappingNameChanged );
flag = (bool *)true;
}
// MappingNameChanged event handler of DataGridColumnStyle.
void columnStyle_MappingNameChanged( Object^ /*sender*/, EventArgs^ /*e*/ )
{
MessageBox::Show( "Mapping Name changed" );
}
private void AddCustomColumnStyle()
{
DataGridTableStyle myTableStyle = new DataGridTableStyle();
myTableStyle.MappingName = "Orders";
myColumnStyle = new DataGridTextBoxColumn();
myColumnStyle.MappingName="Orders";
myColumnStyle.HeaderText="Orders";
myTableStyle.GridColumnStyles.Add(myColumnStyle);
myDataGrid.TableStyles.Add(myTableStyle);
myColumnStyle.MappingNameChanged+=new EventHandler(columnStyle_MappingNameChanged);
flag=true;
}
// MappingNameChanged event handler of DataGridColumnStyle.
private void columnStyle_MappingNameChanged(object sender, EventArgs e)
{
MessageBox.Show("Mapping Name changed");
}
Private Sub AddCustomColumnStyle()
Dim myTableStyle As New DataGridTableStyle()
myTableStyle.MappingName = "Orders"
myColumnStyle = New DataGridTextBoxColumn()
myColumnStyle.MappingName = "Orders"
myColumnStyle.HeaderText = "Orders"
myTableStyle.GridColumnStyles.Add(myColumnStyle)
myDataGrid.TableStyles.Add(myTableStyle)
AddHandler myColumnStyle.MappingNameChanged, AddressOf columnStyle_MappingNameChanged
flag = True
End Sub
' MappingNameChanged event handler of DataGridColumnStyle.
Private Sub columnStyle_MappingNameChanged(ByVal sender As Object, ByVal e As EventArgs)
MessageBox.Show("Mapping Name changed")
End Sub
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET