Hi Cadel,
We can use ComboBox.SelectedItem to get the view of the selected row. Its
type is DataRowView. Then we can use DataRowView.Item property to get
certain column value. Sample code like this:
private void button1_Click(object sender, System.EventArgs e)
{
DataRowView drv=this.cboPrivilege.SelectedItem as DataRowView;
MessageBox.Show(drv["Lastname"].ToString());
MessageBox.Show(drv["EmployeeID"].ToString());
}
Hope this helps
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.