December 2001
Intermediate to advanced
416 pages
8h 16m
English
To allow the user to select an employee row of the DataGrid, we must provide a button column. A button column can be any of three types: Select; Edit, Up date, Cancel; or Delete. Clicking on a specific button column raises its associated event. For example, the blank push-button in the leftmost DataGrid column is a button column of type Select. When the user clicks on it, a select event is raised. Here is the associated handler:
public void DataGrid1_SelectedIndexChanged (object sender, EventArgs e) { Label5.Text = "OK. Dialing: " + DataGrid1.SelectedItem.Cells[2].Text + " " + DataGrid1.SelectedItem.Cells[1].Text + " at " + DataGrid1.SelectedItem.Cells[4].Text + " with video "; Label5.Text += CheckBox1.Checked ? "on." ...Read now
Unlock full access