Hi Friends,
I created edit button dynamically button dynamically with the following code.
ed = "<input style='height:22px;width:55px;' type='button' value='Edit' onclick=\"editSection('" + last_row + "');\" />";
and i am calling editSection(rowToBeEdited) function
function editSection(secIndex) {
alert("edit row="+secIndex);
var userid= $("#UserID").val('');
$("#UserName").val('');
var myGrid = $("#UsersGrid");
$("#UserName").val(myGrid.jqGrid('getCell', secIndex, 'UserName'));
$("#btnUpdate").css("display", 'inline');
$("#POPUP").dialog({ width: 400 });
}
and i am displaying the popup data is
<table id="UsersGrid"></table>
<div id="UsersGridPager"></div>
<form id="commentForm" runat="server">
<div id="POPUP" style="display:none;">
<fieldset>
<p>
<label for="UserName">User Name:</label>
<input id="UserName" name="UserName" size="25" class="required" />
</p>
<p>
<input id="btnUpdate" type="button" value="Update" önclick="saveEditedData()" />
<input id="cancel" type="button" value="Cancel" önclick="cancelChanges()" />
</p>
</fieldset>
</div>
</form>
on update button click i am calling the
saveEditedData
()
function saveEditedData()
{
var userName = $("#UserName");
$.ajax({
url: "editRow.ashx?UserID=" + 9 + "&UserName=" + UserName.val(),
cache: false,
crossDomain: true,
dataType: "jsonp"
}).done(function (secIndex) {
alert(secIndex.Response.id + " is edited ");
$("#UsersGrid").trigger("reloadGrid");
});
$("#POPUP").dialog('close');
}
function cancelChanges()
{
$("#POPUP").dialog('close');
}
The main problem is when i am passing value like url:
"editRow.ashx?UserID=" + 9 + "&UserNe ame=" + UserName.val()
, the
editRow.ashx
is not calling ?
How can I get this date from
ashx
page?