Hi all,
I can return the rowindex using SelectedRow or SelectedIndex
But, how do I get my code to return the cell or column index of a selected
row in my gridview?
Thank Advance,
Mala
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hirendra SisodiyaRank #258 · 9.8K reputationPosted Mar 17, 2010, 2:55 AM EDT
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
int CellIndex = e.ColumnIndex;
}
thanks
Manath Pathana86 reputationPosted Mar 17, 2010, 5:41 PM EDT
how about event of this code? because i write it in
asp.net. in gridview don't have this event it.
it in event "onselectedindexchanged"?
please tell me.
Thank,
Mala
Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 17, 2010, 9:24 PM EDT
here is list of events supported by Gridview in asp.net 3.5
you any that suited your requirements.
mark as answer if it helps.