本文介绍了可编辑网格视图如何的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我有gridview,每个有5-10条记录。每个记录在db ..中有大约30个列字段,但为了简单起见,我只在数据网格中显示5个。



这些记录中的每一个都应该是可编辑的。当我点击其中一个编辑时...我希望所有30个文本框都加载这些记录。





如何在.net 4.0中实现这个目标



谢谢

Hello

I have gridview that has 5-10 records each. Each record has about 30 column fields in the db..but im display only 5 in the datagrid for simplicity purposes.

Each of these records should be editable. When I click edit on one of them ...I want all the 30 textboxes to load with each of these records.


How to achieve this in .net 4.0

Thanks

推荐答案

<asp:templatefield headertext="FirstName" sortexpression="FirstName" xmlns:asp="#unknown">
    <edititemtemplate>
        <asp:textbox id="TextBox1" runat="server" text="<%# Bind("FirstName") %>"></asp:textbox>
    </edititemtemplate>
    <itemtemplate>
    </itemtemplate>
</asp:templatefield>


这篇关于可编辑网格视图如何的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 20:54
查看更多