DataGrid.BackButtonClick Kejadian
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Terjadi ketika tombol Back
pada tabel anak diklik.
public:
event EventHandler ^ BackButtonClick;
public event EventHandler BackButtonClick;
member this.BackButtonClick : EventHandler
Public Custom Event BackButtonClick As EventHandler
Jenis Acara
Contoh
Contoh kode berikut menambahkan penanganan aktivitas untuk peristiwa tersebut BackButtonClick .
// Create an instance of the 'BackButtonClick' EventHandler.
private:
void CallBackButtonClick()
{
myDataGrid->BackButtonClick += gcnew EventHandler( this, &MyDataGrid::Grid_BackClick );
}
// Raise the event when 'BackButton' on child table is clicked.
void Grid_BackClick( Object^ /*sender*/, EventArgs^ /*e*/ )
{
// String variable used to show message.
String^ myString = "BackButtonClick event raised, showing parent table";
// Show information about Back button.
MessageBox::Show( myString, "Back button information" );
}
// Create an instance of the 'BackButtonClick' EventHandler.
private void CallBackButtonClick()
{
myDataGrid.BackButtonClick += new EventHandler(Grid_BackClick);
}
// Raise the event when 'BackButton' on child table is clicked.
private void Grid_BackClick(object sender, EventArgs e)
{
// String variable used to show message.
string myString = "BackButtonClick event raised, showing parent table";
// Show information about Back button.
MessageBox.Show(myString, "Back button information");
}
' Create an instance of the 'BackButtonClick' EventHandler.
Private Sub CallBackButtonClick()
AddHandler myDataGrid.BackButtonClick, AddressOf Grid_BackClick
End Sub
' Raise the event when 'BackButton' on child table is clicked.
Private Sub Grid_BackClick(ByVal sender As Object, ByVal e As EventArgs)
' String variable used to show message.
Dim myString As String = "BackButtonClick event raised, showing parent table"
' Show information about Back button.
MessageBox.Show(myString, "Back button information")
End Sub
Keterangan
Tombol Back
menjadi terlihat saat tabel anak ditampilkan. Mengklik tombol akan menyebabkan kisi menampilkan tabel induk.
Berlaku untuk
Lihat juga
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.