Click here to Skip to main content
15,906,097 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have one datatable with more than 1000 rows. When I am binding the values to gridview I should show (+) plus sign each row. Then when i am clicking that + sign I will show textbox control below the row. So how to do?
Posted
Comments
[no name] 7-Dec-11 5:04am    
what is that plus sign for? editing?
Code 89 7-Dec-11 5:09am    
is that plus sign refers to adding?
Member 7684075 7-Dec-11 5:10am    
Just i want to put plus sign or leave it about plus sign. When i am clicking the row i should show some design below the row in gridview. how to do?

1 solution

Use a listview that renders the table rows. Add an extra row under each row, that is hidden in HTML.
style="display:none;"

In this row you can add more controls and with jquery you can make it visible when the user clicks the + button.
var textbox = $('#textboxid').css('display', 'block');


Another possiblitiy is to postback to the page when the user clicks the + button. After that determine what row is clicked, and only add the extra row for this clicked row.
 
Share this answer
 
v2
Comments
Member 7684075 7-Dec-11 6:12am    
Thanks Herms. But this is i am not expected. My expectation is when i am clicking the row i should show the texbox and other control below that particular row selected.
K Herms 7-Dec-11 6:31am    
Instead of a gridview, use a listview. I updated my answer
Member 7684075 7-Dec-11 7:16am    
Tnx again Herms. But this is not my expectation. When I am clicking the row it should be like accordion will come. Next row will be drilldown and our design will be show after our row clicking.

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