How to make a db grid read-only (Epicor 10)

The above should stop deletions via the grid but the button may be deleting it from the dataview directly.

You can try using the BeforeToolClick event to turn off the delete button if the grid is active.
    private void RMAProcForm_BeforeToolClick(object sender, Epicor.Mfg.UI.FrameWork.BeforeToolClickEventArgs args)
        string name = args.Tool.Key;
        switch (name)
            case "DeleteTool":
// check if the grid has focus, could also use the current view to see which view is being looked at
// most of the time it will turn back on again in the appropriate place.
baseToolbarsManager.Tools["DeleteTool"].SharedProps.Enabled = false;

Jim Kinneman
Encompass Solutions. Inc.

Encompass Solutions. Inc.
I have a grid on a custom form to display records in a UD table. I am able to disable inserting and updating on the grid, but could not disable deleting a row from grid. When user click delete button on toolbar while a row is selected, the row is deleted. I was able to use to code prevent the underlying record from being deleted from table. Here are what I did so far (none works):

1. On Form_Load event, I have this code:
gridTest.DisplayLayout.Override.AllowDelete = Infragistics.Win.DefaultableBoolean.False;

I also try to use csm get a reference to gridTest and set AllowDelete to false.

2. in gridTest_BeforeRowsDeleted event handler, set args.Cancel = true;

Does anyone know how to disallow deleting row on a grid?