javascript - Editing a gridview cell using Modal which is shown using rel attribute -


i open (css made)modal dialog using rel="#showeditmodal" attribute of button.

i used add values database update gridview , got working @ last.

problem need edit values when clicked upon in gridview.

it this:

<asp:templatefield> <itemtemplate> <asp:button id="btneditdep" rel="#showeditmodal" cssclass="btn showmodal"  runat="server" causesvalidation="false"  text="test" onclientclick="window.scrollto =  function(x,y) { return true; };"  />                                     </itemtemplate> </asp:templatefield> 

this pretty screws me because need send variable(id) modal

1) if put inside grid_rowcommand won't go there until after modal shows tried putting value inside viewstate => can't seem able extract value gridview

2) tried open modal dynamically adding attribute ("rel","#showeditmodal") dynamically inside grid_rowcommand apparently need click again show modal (looked programmatically clicking button failed)

3) tried this(didn't work - couldn't send parameter)

onclientclick="savevalue('<%= (btneditdep.clientid).text %>);  window.scrollto = function(x,y) { return true; };" .... function savevalue(name) {     $("hiddenelement").value = "<%= (btneditdep.clientid).text  %>"; } 

how can accomplish because stumped.

thanks.

i think should try pack function of saving data , refreshing gridview in service , use ajax fire on client side, that's nature solution problem.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -