As I said before, when you set it to Visible=false, it won't get rendered to the browser. Use a hiddenfield instead or use css to make the column invisible.
Grz, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
It's best to start a new thread for that and refer to another thread if necessary. Adding on top of resolved questions with new questions makes a thread less transparent.
mamtagupta
first i have find tr tag in javascript. then input tag. I i want to identify input tag through id.
Start a new thread and explain in more detail what you're after, what your rendered code looks like or what code you already have.
Grz, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
mamtagupta
Member
328 Points
169 Posts
how to find gridview hidden label value from javascript
Jan 04, 2010 09:55 AM|LINK
hi
I have a dynamic gridview.I have emp_id in label which is hidden.I want to get emp_id in javascript.
javascript gridview asp .net 3.5
Regards
Mamta
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 10:03 AM|LINK
Hi,
if you set the label control to visibility=false then it won't get rendered. Use a <asp:HiddenField> control instead.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
raju dasa
Star
14412 Points
2452 Posts
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 10:18 AM|LINK
HI
Show ur Gridview (table) markup code from view-source from browser.
so that u can get quick solutions here.
-----------------------------
Happy Coding.
rajudasa.blogspot.com || blog@opera
mamtagupta
Member
328 Points
169 Posts
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 10:50 AM|LINK
hi
but i want to hide gridview column how can i do that. If i am using template field visible false then again same situation occured.
Regards
Mamta
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 10:53 AM|LINK
Hi,
As I said before, when you set it to Visible=false, it won't get rendered to the browser. Use a hiddenfield instead or use css to make the column invisible.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
mamtagupta
Member
328 Points
169 Posts
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 11:06 AM|LINK
hi
css can hide a dynamic grid column. If you have that css code please provide me.
Regards
Mamta
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 11:18 AM|LINK
Hi,
in css create a class like
.hideColumn { display:none; }
and set it on the column template like CssClass="hideColumn"
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
mamtagupta
Member
328 Points
169 Posts
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 11:55 AM|LINK
hi
thanks its working.
But i have one more problem. first i have find tr tag in javascript. then input tag. I i want to identify input tag through id.
How can i do that.
Regards
Mamta
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: how to find gridview hidden label value from javascript
Jan 04, 2010 12:27 PM|LINK
Hi,
No problem.
It's best to start a new thread for that and refer to another thread if necessary. Adding on top of resolved questions with new questions makes a thread less transparent.
Start a new thread and explain in more detail what you're after, what your rendered code looks like or what code you already have.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
april_123456
Participant
775 Points
246 Posts
Re: how to find gridview hidden label value from javascript
Jan 05, 2010 02:33 AM|LINK
Hi
U can try this:
var trObject = document.getElementById(your tr Id);
var inputs = trObject.getElementsByTagName("INPUT");
inputs appear as an array
_______________________
April
http://www.comm100.com/livechat/