We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspxgridview confirm delete

Trying out the web gridview, how do you get a confirm delete pop up when deleting a row.

EG:

Using normal .net 2.0 grid I would add a link button to a templated column and put an onclientclick event on it like this:

<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" ValidationGroup="update" OnClientClick="return confirm('Are you sure you want to delete?')"></asp:LinkButton>

With aspxgridview how do I add a confirm delete message to the grid:

<dxwgv:aspxgridview id="ASPxGridView1" runat="server" autogeneratecolumns="False" datasourceid="ObjectDataSource1" keyfieldname="ref" >

Is there a built in property, or is there a client event I have to catch etc?

Hi,

Well, i am not sure about GridView .NET control if it can perform your desired task. But Aspose.Grid.Web (GridWeb) can certainly do it. Aspose.Grid.Web provides a context menu, you may right click on the grid after selecting a row, select Delete row option to delete a row. The client event can be initiated.

e.g.,

In the Html souce code of the page.....first set the event handler for onSubmit event i.e.,...

Now in tag, use the following code:

For further reference, please check the source codes of the demos: http://www.aspose.com/demos/aspose.grid/default.htm and check the scripting demos in particular.

Thank you.