I have a query on the DataBinding of DataGridView to BindingList object.
I have a Class called Customer having a structure decribed as Below.
public class Customer
{
public int CutomerType { get; set; }
public string CustomerName { get; set; }
}
public class LookupData
{
public int Key
{
get;
set;
}
public string Value
{
get;
set;
}
public override string ToString()
{
return this.Value;
}
}
I have created a BindingList<Customer> and binded with the DataGrid. The Grid has 2 columns
1) GridViewComboBoxColumn - with Data source as List of Lookup data and the FieldName as CustomerType
2) GridViewTextBoxColumn - for CustomerName
Everything works fine , I am able to Add, Update and Delete entries.
But my problem is When I add a new row the , the new customer object is added to the BindingList only after I come out of the Grid row.
I want to add a new Customer Item to my BindingList when the user adds a new row and selects a CustomerType.
Note : I checked with Normal Winform Grid and It adds an entry if I select Customer Type alone.
Can you please let me know if there is any option available for this..
Thanks
Abhilash