如何在ASP listview中编辑特定列值 [英] How to make particular column values editable in ASP listview

查看:71
本文介绍了如何在ASP listview中编辑特定列值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用SharePoint的页面,我们使用用户控件来显示内容和所有内容。在我的情况下,有一个listView显示数据,当我点击一个按钮,我想让所有特定列的行可编辑。可编辑意味着我需要向每行的每个单元格添加控件(日期选择器)。任何人都可以帮助我..



这是列表视图



Hi,

I am working on a page in SharePoint where we are using the user control to show the contents and all. In my case there is a listView that displays data and when i click a button i want to make all rows of particular columns editable. Editable means i need to add controls(date picker) to each cell of each rows. Can anyone help me ..

Here is the listview

<asp:ListView ID="listExcelData" runat="server" ItemPlaceholderID="PlaceHolder2">
    
                <ItemTemplate>
                    <tr>
                       
                           
                        <asp:ListView runat="server" ID="PlaceHolder2" DataSource='<%# ((System.Data.DataRowView)Container.DataItem).Row.ItemArray %>'>
                            <ItemTemplate>
                                <td><%# Container.DataItem %></td>
                            </ItemTemplate>
                        </asp:ListView>
                    </tr>
                </ItemTemplate>
            </asp:ListView>







提前致谢

Arjun Menon




Thanks in advance
Arjun Menon

推荐答案

任何此类问题的第一步是在Google上搜索或至少在CP上搜索!



有一个关于CP的好文章这里 [ ^ ]



应该可以给你指示。



在OP明确表示他希望列的所有行都可以编辑之后,我发现了一篇文章,其中正好在 http://galratner.com/blogs/net/archive/2010/07/25/having-some-fun-with-the-listview-control-in-asp-net.aspx [<一个HREF =http://galratner.com/blogs/net/archive/2010/07/25/having-so me-fun-with-listview-control-in-asp-net.aspxtarget =_ blanktitle =New Window> ^ ]



希望有所帮助。
The first step for any such question would be to search on Google or atleast on CP!

There is one good article on CP here [ ^]

That should be able to give you direction.

after clarity from OP that he wants all rows of a column to be editable, I found an article, which does precisely this at http://galratner.com/blogs/net/archive/2010/07/25/having-some-fun-with-the-listview-control-in-asp-net.aspx[^]

Hope that helps.


这篇关于如何在ASP listview中编辑特定列值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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