C
Charles Bazi
Hi,
Based on MSDN http://msdn2.microsoft.com/en-us/library/7tas5c80.aspx
smple, I have made my custom DataGridViewColumn.
I use it to host a custom control, sort of ComboBox, but instead of
having a dropdown list, it opens a search dialog when the button of
control (a textbox with a button) is pressed.
So, when I pick something with my control, I have two results in my
control: a GUID and a text for the GUID 'explanation'.
I override Paint event in my DataGridViewTextBoxCell and I put the GUID
value on object'value' parameter and the text 'explanation' of the GUID
in object formattedValue parameter.
It works well, but when I edit another cell of the same row, or even a
textbox in the form hosting the DataGridView, the cell of my custom cell
becomes blank...
I guess it have something to do with DataBinding refresh, but I really
don't know how to handle it ?
Thank you
Based on MSDN http://msdn2.microsoft.com/en-us/library/7tas5c80.aspx
smple, I have made my custom DataGridViewColumn.
I use it to host a custom control, sort of ComboBox, but instead of
having a dropdown list, it opens a search dialog when the button of
control (a textbox with a button) is pressed.
So, when I pick something with my control, I have two results in my
control: a GUID and a text for the GUID 'explanation'.
I override Paint event in my DataGridViewTextBoxCell and I put the GUID
value on object'value' parameter and the text 'explanation' of the GUID
in object formattedValue parameter.
It works well, but when I edit another cell of the same row, or even a
textbox in the form hosting the DataGridView, the cell of my custom cell
becomes blank...
I guess it have something to do with DataBinding refresh, but I really
don't know how to handle it ?
Thank you