Hi,
I have a question regarding setting up the DataGridViewCell as DataGridViewComboBox cell.
I am changing the properties of the column through the Property Window
1. I have a datagridview connected to an Employee Trades Table through EmployeeTradesBindingSource
2. One of the columns in the gridview called "Comments" (which is a field in employee trades table) I want to populate from another table "Trade Comments" through 'EmployeeTradesBindingSource'
3. So I edited the column Property set the
.DataSource = EmployeeTradesBindingSource
.DataPropertyName = Comment( column name in "Trade Comments")
.DisplayMember = "Comments"
.DisplayStyle = DropDownButton
Now when the grid is displayed, I am getting the 'Comments' as a combo box but there is no value in the current cell of the grid, but I have to select it from the combo. When the grid is displayed my current cell is blank for Comments.
What will I do to display that?
Also when I change the comment to another comment and click save, employeetradesBindingsource will update the 'Employee Trades' Table except for the 'Comments' column
I feel my Comments column is behaving independent of EmployeeTrades table and only depending on TradeComments Table
What will I do to resolve this?
If I get any help asap, I would highly appreciate it
Thanks in advance!!!
I have a question regarding setting up the DataGridViewCell as DataGridViewComboBox cell.
I am changing the properties of the column through the Property Window
1. I have a datagridview connected to an Employee Trades Table through EmployeeTradesBindingSource
2. One of the columns in the gridview called "Comments" (which is a field in employee trades table) I want to populate from another table "Trade Comments" through 'EmployeeTradesBindingSource'
3. So I edited the column Property set the
.DataSource = EmployeeTradesBindingSource
.DataPropertyName = Comment( column name in "Trade Comments")
.DisplayMember = "Comments"
.DisplayStyle = DropDownButton
Now when the grid is displayed, I am getting the 'Comments' as a combo box but there is no value in the current cell of the grid, but I have to select it from the combo. When the grid is displayed my current cell is blank for Comments.
What will I do to display that?
Also when I change the comment to another comment and click save, employeetradesBindingsource will update the 'Employee Trades' Table except for the 'Comments' column
I feel my Comments column is behaving independent of EmployeeTrades table and only depending on TradeComments Table
What will I do to resolve this?
If I get any help asap, I would highly appreciate it
Thanks in advance!!!