Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The NewButton in the header template of the aspxgridview(DevExpress Control)

Tags:

gridview

Can I add the NewButton in the header template of the aspxgridview(DevExpress Control) to insert a new record to the aspxgridview ?becuase I don't want to add the NewButton in every row in the grid

I would appreciate any help in this

like image 539
kathy Avatar asked Feb 27 '23 09:02

kathy


1 Answers

Try this link

This has been brought up a few times (and answered) on the DevExpress forums.

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

as in...

<input id="btnAdd" type="button" value="Add" onclick="grid.AddNewRow();" />
like image 136
Marcus Avatar answered Apr 05 '23 22:04

Marcus