The grid DeleteSelectedRows method provides an option to display a prompt dialog to the user. Since the method does not return any value, is there any other way to determine if the user clicked on the "No" button.
Hi Neil,
One thing you could do is trap AfterRowsDeleted. It will only fire if the user did not cancel.So if it doesn't fire, you know the user cancelled.
If you need more control than that, I suggest you handle the BeforeRowsDeleted event and cancel the default prompt by setting e.DisplayPromptMsg. Then you can display your own MessageBox and you will know the result. If the user cancels your dialog, you just set e.Cancel to true.
Hi Mike
We need to the default delete prompt to show in the user's language. Is there some way to make it show as per the ".NET culture" setting? i.e. the app when run in a Japanese .NET culture would display the prompt in Japanese?
Ideally I would like to avoid implementing my own message box and use something like Infragistics.Shared.ResourceCustomizer to make this happen .
Thanks!
Mike, thanks. I forgot that I had actually asked this same question some time ago...guess I did not like the answer and thought I'd "Ask Dad" to see if I got some other response I guess. Sorry.
I decided to just replace the function with one of my own where I can set the message(s) the way I want and have control over what I do with removing and then deleting rows form the backing list of business objects.
Neil