I have a bound datagrid on a form, with a close button. All the close button
does is call me.close. If I edit a cell, then click my close button, the edit
can be seen in the grid, as expected, when I enter my form_closing event code.
However if I edit a cell then click the "X" in the top right corner of the
form, the form_closing event fires, but the grid shows the "old" value of the
cell, thus the change to the cell is not saved.
I am working around this currently by preventing the user form using the "X"
to close the form, but there must be a better way ?

Re: datagrid edit not saved on exit by Bruno

Bruno
Tue Nov 15 04:12:40 CST 2005

are you using DataGridView ?

is so, check this: http://msdn2.microsoft.com/en-us/library/ms171610.aspx


--



Bruno Alexandre
(Sintra, PORTUGAL)



"Marty" <Marty@discussions.microsoft.com> escreveu na mensagem
news:00266971-F79F-43E5-9BB8-85B21FC5306F@microsoft.com...
>I have a bound datagrid on a form, with a close button. All the close
>button
> does is call me.close. If I edit a cell, then click my close button, the
> edit
> can be seen in the grid, as expected, when I enter my form_closing event
> code.
> However if I edit a cell then click the "X" in the top right corner of the
> form, the form_closing event fires, but the grid shows the "old" value of
> the
> cell, thus the change to the cell is not saved.
> I am working around this currently by preventing the user form using the
> "X"
> to close the form, but there must be a better way ?



Re: datagrid edit not saved on exit by Marty

Marty
Tue Nov 15 05:00:42 CST 2005

I assume the DataGridView is new in Framework 2 ?
I'm still using 1.1. Looks like it's time for an upgrade ...

"Bruno Alexandre" wrote:

> are you using DataGridView ?
>
> is so, check this: http://msdn2.microsoft.com/en-us/library/ms171610.aspx
>
>
> --
>
>
>
> Bruno Alexandre
> (Sintra, PORTUGAL)
>
>
>
> "Marty" <Marty@discussions.microsoft.com> escreveu na mensagem
> news:00266971-F79F-43E5-9BB8-85B21FC5306F@microsoft.com...
> >I have a bound datagrid on a form, with a close button. All the close
> >button
> > does is call me.close. If I edit a cell, then click my close button, the
> > edit
> > can be seen in the grid, as expected, when I enter my form_closing event
> > code.
> > However if I edit a cell then click the "X" in the top right corner of the
> > form, the form_closing event fires, but the grid shows the "old" value of
> > the
> > cell, thus the change to the cell is not saved.
> > I am working around this currently by preventing the user form using the
> > "X"
> > to close the form, but there must be a better way ?
>
>
>

Re: datagrid edit not saved on exit by Bruno

Bruno
Tue Nov 15 05:35:46 CST 2005

yes 2.0

the final version is out there...
so I grabed one, and I do not have any complain to say about this final
version :)

--



Bruno Alexandre
(Sintra, PORTUGAL)



"Marty" <Marty@discussions.microsoft.com> escreveu na mensagem
news:35FC44E6-0D84-447A-9665-741DF76E305C@microsoft.com...
>I assume the DataGridView is new in Framework 2 ?
> I'm still using 1.1. Looks like it's time for an upgrade ...
>
> "Bruno Alexandre" wrote:
>
>> are you using DataGridView ?
>>
>> is so, check this: http://msdn2.microsoft.com/en-us/library/ms171610.aspx
>>
>>
>> --
>>
>>
>>
>> Bruno Alexandre
>> (Sintra, PORTUGAL)
>>
>>
>>
>> "Marty" <Marty@discussions.microsoft.com> escreveu na mensagem
>> news:00266971-F79F-43E5-9BB8-85B21FC5306F@microsoft.com...
>> >I have a bound datagrid on a form, with a close button. All the close
>> >button
>> > does is call me.close. If I edit a cell, then click my close button,
>> > the
>> > edit
>> > can be seen in the grid, as expected, when I enter my form_closing
>> > event
>> > code.
>> > However if I edit a cell then click the "X" in the top right corner of
>> > the
>> > form, the form_closing event fires, but the grid shows the "old" value
>> > of
>> > the
>> > cell, thus the change to the cell is not saved.
>> > I am working around this currently by preventing the user form using
>> > the
>> > "X"
>> > to close the form, but there must be a better way ?
>>
>>
>>