Click here to Skip to main content
15,924,553 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello.
I have a grid view with several template fields (for drop-downs) which is working fine if I place it outside of the DIV what I use as modal dialog. Grid has onrowdatabound and OnRowDeleting events and additionally a button to add a new row to the grid. When I tried to move this grid to the Modal dialog the Add button stopped working. The click event is coded in code behind and it does not fire. I got an advise to use PostbackTrigger what didn't work for me. Another possibility was to use gridview.RowCommand event. But it handles all button related events inside a cell of a gridview whereas my button is outside of grid. Third: using jquery to force the postback on the button click using the __dopostback()and here I got confused since my experience with suff like that is not enough. On this site there is a link ezplaining how to use it
http://www.codeproject.com/Articles/667531/doPostBack-function
But I have no header or form tags on my page. It is on Master. Should I move the function __doPostBack on Master? And do Request.Form["__EVENTTARGET"] also there?
Can anyone help me to understand how I should handle it? Any help will be appreciated.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900