Hi,
To display a confirmation dialog box, please try to use a ButtonColumn as demonstrated here:
http://demo.essentialobjects.com/Demos/Grid/Features/Deleting%20with%20Confirmation/Demo.aspxAll the built-in commands (Edit, Delete, Update and Cancel) bypasses ClientSideOnItemCommand. ClientSideOnItemCommand is for custom "generic" commands only. For a ButtonCommand, your handler will be responsible to actually carry out the deletion (see the sample code for how to do this). So if you wish to cancel the delete, just do nothing in your handler, which effective disable the command.
If you wish to have the disabled command to look differently (for example, grayed out), then you must supply a different style for that cell. For example, the following code applies CSS rule "disabled_button" to the third cell of the second row:
Code: CSS
.disabled_button
{
padding-top: 2px;
padding-left: 8px;
}
.disabled_button a
{
color: gray;
text-decoration: none;
}
.disabled_button a:hover
{
color: gray;
text-decoration: none;
}
.disabled_button a:visited
{
color: gray;
text-decoration: none;
}
Code: JavaScript
var grid = eo_GetObject("Grid1");
grid.getItem(1).getCell(2).overrideStyle("disabled_button");
You can also apply the style through data binding. See here for more details:
http://demo.essentialobjects.com/Demos/Grid/Features/Conditional%20Formatting%20-%20Cell%20Based/Demo.aspxHope this helps. Please let us know if you still have any questions.
Thanks!