NewButton in aspxgridview header template (DevExpress Control)

Can I add a NewButton to the aspxgridview (DevExpress Control) header template to insert a new entry into aspxgridview? Because I do not want to add NewButton to every row in the grid

I would be grateful for any help with this.

+4
source share
3 answers

Try link

This has been raised several times (and answered) on DevExpress forums.

The essence of the solution is to add a footer template to your grid, and then put the html button in the footer using OnClick handler set to mygridname.AddNewRow();

how in...

 <input id="btnAdd" type="button" value="Add" onclick="grid.AddNewRow();" /> 
+6
source

To answer your question, I have never seen this in a GridView header (probably because most users want to keep the column headers that execute in the header). I’m a little curious.

I saw this in the footer. If you want to do it this way, here are a few links (with pictures, horray) to get you started:

NTN.

+2
source

http://www.devexpress.com/Support/Center/Question/Details/Q357944

I hope this forum helps you

Just try the code below

 <dx:ASPxGridView ID="grvParametros" ClientInstanceName="grid" runat="server" ...> ... <Templates> <Header> <a href="javascript:grid.AddNewRow()">New</a> </Header> </Templates> </dx:ASPxGridView> 
0
source

Source: https://habr.com/ru/post/1304278/


All Articles