I have problem in gridview Cell value

Posted by Nuwan under ASP.NET on 4/23/2012 | Points: 10 | Views : 1284 | Status : [Member] | Replies : 1
Dear All,

I have bind in grid view using Sql Data Source, It have three main field.
SlipNo,Amount, Date. no i want to get a SlipNo in gridview if i select command field in gridview.
How i do that?
Please help me..........



Posted by: Rajkatie on: 4/23/2012 [Member] [MVP] Gold | Points: 25

you have to implement SelectedIndexChanging event.

protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
string slipNo = GridView1.Rows[e.NewSelectedIndex].Cells[1].Text;

Rajesh Patel
R.P.A Developer | Developer Trainer | Clean Code Evangelist

Nuwan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response