Click here to Skip to main content
12,892,589 members (48,320 online)
Rate this:
Please Sign up or sign in to vote.
See more: Javascript ASP.NET4

I am trying to access current selected gridview cell in javascript.provide soln.thanx
Posted 19-Sep-12 19:15pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hi Vijay,
U can follow this link. Actually it is related to jquery.[^]

Different kinds of selectors are given here. Hope it is useful for u.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi Vijay,

Kindly look into this link.......[^]

This might be very useful then previous one.
Abhijit Parab 20-Sep-12 3:23am
See vithal,
Instead of distracting him again and again. better to post answer here as he is checking for updates after regular interval. I have posted what i understood from his question.
Better provide solution or suggestion related to the answer rather then going personally. In future should not post such comments like seating arrangements or telling verbally this may spoil your and my reputation. Others may create doubt about our membership.
Please don't do this again
Abhijit Parab 20-Sep-12 5:37am
I dont want to fight vijay with anyone. But just see the comment bcoz not only u and me but also all over the world users are using this site. what they will think. We are here to learn and help others not make such irrelevent comments.
I appologies if i have said something wrong.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3


i got answer
javascript code

var gdv=document.getElementById('gridviewId');
var activeCell=gdv.document.activeElement.cellIndex;
var activeRowIndex=gdv.document.activeElement.parentElement.rowIndex;

so my selected cell in activeRowIndex row with cell index activeCell
Abhijit Parab 20-Sep-12 5:03am
Congrats Vijay..............
All the best :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 20 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100