Mapping a business object onto a Windows Forms DataGridViewComboBoxCell
Well, after about two weeks of fighting to solve this issue, I found a solution today.
Issue: Mapping a business object onto a Windows Forms DataGridViewComboBoxCell.
The crux of the issue arises from the fact that a DataGridViewComboBoxCell doesn't have a SelectedItem property.
Solution: Got it from here.Overview: Add a proprety to the business object that refers to itself, and map it to the DataGridViewComboBoxCell's Value property.
E.g:
public class Dimension
{
...
...
public Dimension Self
{ return this; }
...
...
}
1 Comments:
wow! i am mesmerized! :) how are u doing buddy!
Post a Comment
<< Home