473,435 Members | 1,672 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,435 software developers and data experts.

ASP.Net DataGrid Template column when inivisible

I have a datagrid with template comlumns that have textboxes which are
populated via the ItemDataBound command.
However, when I set a column to be invisible, I can no longer retreive
the value of that textbox even though the viewstate is enabled. I can
still retrieve the value of a databound column, so why not a templated
column when it's invisible?

Nov 19 '05 #1
7 1552
On what stage do you try to retreive the value? Note, that if you set the
column property Visible=false, the column won't be rendered to the client.
If you think that could be the problem, make the column invisible with css
rule display:none.

Eliyahu

"spidur1" <sp*****@excite.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a datagrid with template comlumns that have textboxes which are
populated via the ItemDataBound command.
However, when I set a column to be invisible, I can no longer retreive
the value of that textbox even though the viewstate is enabled. I can
still retrieve the value of a databound column, so why not a templated
column when it's invisible?

Nov 19 '05 #2
Yeah the problem is that it's not being redered to the client. How do
I use the css rule display:none? Thanks for your help!

Nov 19 '05 #3
It is not being rendered to the client. That's the problem. How do I
set the css rule?
Thanks for your help!

Nov 19 '05 #4
Make a stylesheet, either on the page or in a separate file, and add a rule
like
..Invisible{display:none}
Set CssClass property of the column to "Invisible"

Eliyahu

"spidur1" <sp*****@excite.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Yeah the problem is that it's not being redered to the client. How do
I use the css rule display:none? Thanks for your help!

Nov 19 '05 #5
There is no CssClass property of the column, only the control itself.

Nov 19 '05 #6
Put

<ItemStyle CssClass="Invisible"></ItemStyle>

within <TemplateColumn> tags

Eliyahu

"spidur1" <sp*****@excite.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
There is no CssClass property of the column, only the control itself.

Nov 19 '05 #7

spidur1 what Eliyahu is advicing is to have:-
<ItemStyle CssClass="Invisible"></ItemStyle>
where Invisible will be the CSS u created in th CSS file.
Hope this helps
Patrick


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Richard Roche | last post by:
Is it possible to use a drop combo instead of a text box when using the EditCommand in the Datagrid? Many table columns are bound to 'lookup' tables, user's don't care about the foreign keys,...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
4
by: Stephan Bour | last post by:
Hi, I have a datagrid databound to a SQL query. I'd like to allow editing of some columns but not all. Is there a way to turn off the conversion of the datagrid cells to textboxes for some columns...
2
by: CW | last post by:
In an earlier thread, I was asking for help on "Invalid attempt to FieldCount when reader is closed" error when I was using a dataset rather than a datareader to bind to a datagrid. After...
0
by: spidur1 | last post by:
I have a datagrid with template comlumns that have textboxes which are populated via the ItemDataBound command. However, when I set a column to be invisible, I can no longer retreive the value of...
1
by: RN | last post by:
Hi. I used this article to add a template column to a datagrid that is entirely created with code: ...
6
by: Khumar | last post by:
Hello, Im new in asp.net especially in web base application. I want to ask about datagrid. I had shown my table on datagrid, and what I want to ask is how to set the column height fixed?...
8
by: Matt | last post by:
Guys I could really use some help with this. I think that it's probably a simple solution but I haven't been able to find anything. I have a datagrid on my form that I populate via code like...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.