Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi how to get value from griadview to text box and dropdowns when i click view from gridview?
Posted
Updated 20-Feb-12 18:42pm
v2
Comments
Varun Sareen 21-Feb-12 0:43am    
please clarify
AmitGajjar 21-Feb-12 1:47am    
do not post same title and detail. Also elaborate your problems using code that helps you to get quick answer.

thanks
-amit

 
Share this answer
 
 
Share this answer
 
hai ythisbug,


<pre lang="xml"><asp:HyperLinkField DataNavigateUrlFields="fieldtopass"
                                        DataNavigateUrlFormatString="url?fieldtopass={0}"
                                        HeaderText="headertext" Text="History">
                                        <ControlStyle Font-Underline="True" Font-Bold="true"  />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:HyperLinkField>
</pre>



it ll pass the value as query string ... u can assign query string value to textbox
 
Share this answer
 
C#
// Get the currently selected row using the SelectedRow property.
GridViewRow row = YourGridViewName.SelectedRow;

YourTextBox.Text = row.Cells[2].Text ";
 
Share this 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