Dear Madam/Sir,
One column of my GridView is a GridViewComboBoxColumn.
I've added an event for RowValidated and want to check the value for this ComboBoxColumn
but I always get "Object reference not set...".
If I use a TextBoxColumn, I get the value without any problems.
Thanks in advance!
Edit: I've set .FieldName wrong... stupid error! Sorry!
One column of my GridView is a GridViewComboBoxColumn.
GridViewComboBoxColumn companyClmn = new GridViewComboBoxColumn( COLUMN_COMPANY ); |
companyClmn.DataSource = this.transport.GetCompanies( this.username ); |
companyClmn.DisplayMember = "companyName"; |
companyClmn.FieldName = "companyID"; |
companyClmn.Width = 150; |
I've added an event for RowValidated and want to check the value for this ComboBoxColumn
but I always get "Object reference not set...".
If I use a TextBoxColumn, I get the value without any problems.
private void SaveToDatabase( object sender, RowValidatedEventArgs e ) { |
object value = e.Row.Cells[0].Value; // object reference not set... |
} |
Thanks in advance!
Edit: I've set .FieldName wrong... stupid error! Sorry!