Click here to Skip to main content
15,908,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to show selected row in textbox n at same time i want to navigate grid...plz hle me?
Posted
Comments
Naga KOTA 11-Oct-12 6:03am    
Can u explain the problem clearly
vivektiwari97701 11-Oct-12 6:03am    
http://www.obout.com/grid/grid_key_navigation.aspx
pallavi Praharaj 11-Oct-12 6:40am    
can you please clarify your question.Is your question is like this:
you have a grid and it contains number of columns and there are text box present (number of text box=number of columns in grid) and you want to show the column value of selected row in text box?
AnkitGoel.com 11-Oct-12 6:50am    
you can override OnSelectedIndexChanged() event and get row index from GridView1.SelectedRow.RowIndex and set it to textbox. keep you gridview inside update panel to make it function.

hi friend,
there is an event in gridview properties...
see the code snippet.. it may usefull..
C#
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        TextBox1.Text = GridView1.SelectedRow.Cells[0].Text;
        TextBox2.Text = GridView1.SelectedRow.Cells[1].Text;
        TextBox3.Text = GridView1.SelectedRow.Cells[2].Text;
        TextBox4.Text = GridView1.SelectedRow.Cells[3].Text;
    }

And i didnt understand ur second requirement...
grid navigation from one page to another page, it is done with 'sessions'
 
Share this answer
 
v2
you can override OnSelectedIndexChanged() event and get row index from GridView1.SelectedRow.RowIndex and set it to textbox. keep you gridview inside update panel to make it function.
 
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