具有添加,删除和编辑选项的网格. [英] Grids that have options to add,delete and edit.

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

问题描述

嘿,

我有一个Asp.net gridview,在其中我无法执行这些操作.是否有任何其他网格可用于执行这些操作而没有太多的忙碌编码?.​​..

hey there,

I have a Asp.net gridview in which i am not able to perform these operations.Is there any other grid which can be used to perform these actions with not much hectic coding?...

推荐答案

这会出现在您的aspx页面中.

This goes in your aspx page.

<pre lang="xml"><asp:GridView ID="SimpleGridView" runat="server" AutoGenerateColumns="False"
            AutoGenerateDeleteButton="True" AutoGenerateEditButton="True"
            onrowdeleting="SimpleGridView_RowDeleting"
            onrowediting="SimpleGridView_RowEditing">
        <Columns>
            <asp:CommandField />
            <asp:TemplateField HeaderText="Company Code"></asp:TemplateField>
            <asp:TemplateField HeaderText="Company Name"></asp:TemplateField>
            <asp:TemplateField HeaderText="Company Value"></asp:TemplateField>
        </Columns>
    </asp:GridView>




在这里捕获您的编辑和删除的事件.




Here you capture your edit, and deleted events.

protected void SimpleGridView_RowEditing(object sender, GridViewEditEventArgs e)
    {

    }
    protected void SimpleGridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {

    }


为什么不能在ASP.net Gridview中执行这些操作?
Why are you not able to preform these operations in ASP.net Gridview?


这篇关于具有添加,删除和编辑选项的网格.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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