Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

C#
<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>



Thanks in advance
Arjun Menon
Posted
Updated 22-Jan-15 4:02am
v2

1 solution

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.
 
Share this answer
 
v2
Comments
Arjun Menon U.K 22-Jan-15 10:15am    
Hi MT
I saw that article and i have the code provided. But its for each and every row. But in my case there will be only a single button to do the edit for the whole list
MT_ 22-Jan-15 10:41am    
Check updated answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900