bindingNavigatorDeleteItem.Pressed is false if last row is deleted

M

Morris Neuman

eI'm working in VS 2008 C# on aWindows Form appliation with a gridview boud
to a daata source and a corresponding bindingNavigator. I Handle the
RowsRemoved event and test the bindingNavigatorDeleteItem.Pressed to see if
the user clicked the Delete button on the binding navigator befoe I issue a
MyDeleteRow() function (where I do other processing).

I need to test this because when a user clicks a Column Header to sort the
gridview I found that the RowRemoved event is generated when it does the
resort. I guess it deletes all the rows and then writes them out again, is
that true?

In testing I now find that the bindingNavigatorDeleteItem.Pressed is
actually false when the last row of the grid is deleted otherwise it is true
when ever the user Cllick the bindingNavigatorDeleteItem button to delete a
row. Why would ths be the case? It doesn't make sense.

How can I trap the event that the last row needs to be deleted and the user
did not cick the row header to sort the grid?

The only thing I can think of is check that there are ow Rows in the
Gridview is that valid?
 
C

Colbert Zhou [MSFT]

Hello Morris,

The managed support service of the newsgroups is now available instead on
MSDN forums: http://social.msdn.microsoft.com/Forums/. Would you please
repost the question in the forum with the Windows Live ID used to access
your Subscription benefits? Our engineers will assist you in the new
platform. The article
http://msdn.microsoft.com/en-us/subscriptions/aa974230.aspx introduces more
information about the migration. In the future, please post your
WinForm-related questions directly to the Winform forums,
http://social.msdn.microsoft.com/Forums/en-US/winforms/threads

If you have any questions or concerns, please feel free to contact us:
(e-mail address removed).


Regards,
Colbert Zhou
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

MSDN Managed Newsgroup and Forum support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top