使用Jquery和ajax添加,编辑,删除gridview的操作... [英] Add,Edit,Delete operation of gridview using Jquery and ajax...

查看:110
本文介绍了使用Jquery和ajax添加,编辑,删除gridview的操作...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





这里我有一个要求即我必须创建一个包含两个texbox和按钮的jquery弹出窗口....当我点击那个按钮我需要保存在gridview和popup应该关闭...



实际上我在谷歌搜索.....我没有得到正确的代码.....我想在Clientside ...

请帮助我.....

Hi,

Here i got one requirement ie i have to create one jquery popup which contains two texbox and button....when i click that button i need to save in gridview and popup should close...

Actually i searched in google.....i didn't got proper code.....Here i want in Clientside...
please help me.....

推荐答案

您好b $ b

我觉得这个链接可以帮到你





更新/删除gridview中的数据 [ ^ ]
Hi
I feel this link may help you


Update/delete data in gridview[^]


这是针对index.cshtml页面的: -

this is for index.cshtml page:-
@using TestDemo16_nov.Models;
@model List<UserViewModel>

@{
    ViewBag.Title = "Home Page";
}
@*<link href="~/Content/Jq%20grid/jquery-ui-custom.css" rel="stylesheet" />*@
<link href="~/Content/jquery-ui.css" rel="stylesheet" />
<link href="~/Content/Jqgrid/jquery-ui-1.8.7.css" rel="stylesheet" />
<link href="~/Content/Jqgrid/ui.jqgrid.css" rel="stylesheet" />
<script src="~/Scripts/Jqgrid/grid.locale-en.js"></script>
<script src="~/Scripts/Jqgrid/jquery.jqGrid.min.js"></script>
<script src="~/Scripts/jquery-ui.js"></script>
<style type="text/css">
    .userRow {
        color: #0769AD !important;
    }
</style>

<script type="text/javascript">

    /****************this is to edit the user**********************/
    function EditUser(id) {


.ajax({
url:@ Url.Action(EditUser,Home)+?id =+ id,
data:userId =+ id,
成功:功能(结果){
.ajax({ url: "@Url.Action("EditUser", "Home")" + "?id=" + id, data: "userId=" + id, success: function (result) {


这篇关于使用Jquery和ajax添加,编辑,删除gridview的操作...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆