Richard
Wed Sep 29 06:11:03 CDT 2004
Cool, I can do this. You've not said I've done something stupid, and the
solution isn't as straight-forward as setting the "NoThisIsReallyReadOnly"
property so does this mean that this is a bug? And if so how does it get
reported and therefore fixed?
"ClayB [Syncfusion]" wrote:
> You might be able to avoid this by deriving the DataGrid and overriding its
> PreProcessMeesage method, and eating the Delete at that point. Here is a FAQ
> link that has sample code doing something similar. It shows how to delete a
> confirmation prompt on pressing delete, but you could just return true
> without showing a message if the key is delete.
>
> George Shepherd's Windows Forms FAQ contains an entry entitled:
>
> How can I put up a confirmation question when the user tries to delete
> a row in the datagrid by clicking on the row header and pressing the Delete
> key?
>
> Check it out at:
>
http://www.syncfusion.com/faq/winforms/search/889.asp
>
> =============================================
> Clay Burch, .NET MVP
>
> Syncfusion, Inc.
> visit
http://www.syncfusion.com for .NET Essentials
>
>
> "Dick" <Richard.Giles@newsgroups.nospam> wrote in message
> news:2CF74707-6399-458A-8470-17731D469F6A@microsoft.com...
> >I have a datagrid bound to a strongly typed dataset. The datagrid can be
> >made
> > readonly by either setting its ReadOnly property to True or by setting the
> > dataset's DefaultView's AllowDelete, AllowEdit, and AllowNew properties to
> > False. But in either case the datagrid still accepts a delete keypress
> > (i.e.
> > press the delete key on the keyboard) and while this doesn't actually
> > delete
> > the record it does set the dataset's HasChanges property to True thereby
> > causing my code to incorrectly ask the user to save his changes. Can this
> > problem be fixed?
>
>
>