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

Solution 1

Hi Vijay,
U can follow this link. Actually it is related to jquery.
 
http://api.jquery.com/category/selectors/?rdfrom=http%3A%2F%2Fdocs.jquery.com%2Fmw%2Findex.php%3Ftitle%3DSelectors%26redirect%3Dno[^]
 
Different kinds of selectors are given here. Hope it is useful for u.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi Vijay,
 
Kindly look into this link.......
 
http://jquerybyexample.blogspot.com/2012/05/get-aspnet-gridview-cell-value-on-click.html[^]
 
This might be very useful then previous one.
  Permalink  
Comments
Abhijit Parab at 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 at 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
good
Please Sign up or sign in to vote.

Solution 3

yeeeeeeeeeeeeeee...........................................
 
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
  Permalink  
Comments
Abhijit Parab at 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)



Advertise | Privacy | Mobile
Web01 | 2.8.150326.1 | Last Updated 20 Sep 2012
Copyright © CodeProject, 1999-2015
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