Click here to Skip to main content
15,921,028 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Gridview row editing in bootstrap.


On clicking of a edit button a modal pop up should appear and all grid row data should be in edit mode.
how to do using ajax call

What I have tried:

function Edit(RecordID) {
$.ajax({
url: 'GroupDoctors.aspx/GetDoctorByGroupCode?ts=' + $.now(),
contentType: 'application/json',
type: 'POST',
data: JSON.stringify({ id: RecordID }),
success: function (res) {

var obj = JSON.parse(res.d);
$('#<%=txtUpperLimit.ClientID%>').val(obj.UpperLimit);
$('#<%=txtLowerLimit.ClientID%>').val(obj.DownLimit);
},
error: function (err) {
}
});

}

How should i call my drop down here
Posted
Updated 7-Mar-17 4:03am
v6
Comments
Graeme_Grant 7-Mar-17 4:14am    
Start googling... you can't keep asking the community to code for you, that's not programming. Programming is problem-solving through code. If you don't know, pick up a book or do a course. Then, when you're stuck, use the debugging tools available to you. Google is a great reference tool. Then, when all these avenues are exhausted post questions with code and specific information, not "Totally confused how to do this".

1 solution

refer these articles and do step by step, it cant be answered in "quick answer"

Bootstrap Modals[^]
Add Edit Update Records in GridView using Modal Popup in ASP.Net[^]
Edit GridView Row in ASP.NET Ajax[^]
 
Share this answer
 
Comments
Mahesh2223 7-Mar-17 4:38am    
started but i have drop downs in modal pop up
Karthik_Mahalingam 7-Mar-17 4:39am    
even you can add a gridview into it, those link are a like reference to complete your task. you cant expect everything over there. then when will you learn coding...
Mahesh2223 7-Mar-17 4:41am    
oh please look at my code
Mahesh2223 7-Mar-17 8:01am    
if i use id with drop down its not getting selected item in modal pop up,in the gridview row edit click
Karthik_Mahalingam 7-Mar-17 8:03am    
$('#<%=YourDDLID.ClientID%>').val(obj.dropdownvalue);

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