Binding data to the custom DataGridView
Posted
by Jatin Chaturvedi
on Stack Overflow
See other posts from Stack Overflow
or by Jatin Chaturvedi
Published on 2009-11-06T08:22:51Z
Indexed on
2010/06/14
15:02 UTC
Read the original article
Hit count: 364
datagridview
All,
I have a customized DataGridView where I have implemented extra functionality and bounded datasource in the same custom DataGridView (Using C# and .NET). Now, I could able to use it properly by placing it on a panel control. I have added label as button on panel control to display data from datasource on to datagrid and create a binding source. Another Label which act as a button is used to update data from grid to databse.
Issue: I pressed show label to display data in a dsatagridview. Modified the grid cell value and immediately pressed update label which is on same panel control. I observed that, the cursor is still in the grid cell when I press Save button. While saving, the cell value is null even though I have entered something in the presentation layer. My expected behaviour is to get the modified value while saving.
Special Case: After typing something in the grid cell, if I click on somewhere else like the row below where I entered something, before I click on Save button, it is working fine. (Here, mainly I tried to remove the focus from the currently modified cell)
Is there any way to bind sources before I click on save button? Please suggest me.
Please feel free to ask me if you need any information.
I have also seen same kind of problem on this forum, but unfortunately the author got the answer and didnt post it back.
here is that URL:
Please help me.
© Stack Overflow or respective owner