Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - ASP.Net DataGrid Template column when inivisible

 
Thread Tools Search this Thread
Old 12-30-2004, 06:13 PM   #1
Default 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?



spidur1
  Reply With Quote
Old 12-30-2004, 06:23 PM   #2
Eliyahu Goldin
 
Posts: n/a
Default Re: ASP.Net DataGrid Template column when inivisible
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" <> wrote in message
news: 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?
>





Eliyahu Goldin
  Reply With Quote
Old 12-30-2004, 06:29 PM   #3
spidur1
 
Posts: n/a
Default Re: ASP.Net DataGrid Template column when inivisible
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!



spidur1
  Reply With Quote
Old 12-30-2004, 06:31 PM   #4
spidur1
 
Posts: n/a
Default Re: ASP.Net DataGrid Template column when inivisible
It is not being rendered to the client. That's the problem. How do I
set the css rule?
Thanks for your help!



spidur1
  Reply With Quote
Old 12-30-2004, 06:35 PM   #5
Eliyahu Goldin
 
Posts: n/a
Default Re: ASP.Net DataGrid Template column when inivisible
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" <> wrote in message
news: 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!
>





Eliyahu Goldin
  Reply With Quote
Old 12-30-2004, 06:40 PM   #6
spidur1
 
Posts: n/a
Default Re: ASP.Net DataGrid Template column when inivisible
There is no CssClass property of the column, only the control itself.



spidur1
  Reply With Quote
Old 12-30-2004, 10:01 PM   #7
Eliyahu Goldin
 
Posts: n/a
Default Re: ASP.Net DataGrid Template column when inivisible
Put

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

within <TemplateColumn> tags

Eliyahu

"spidur1" <> wrote in message
news: ups.com...
> There is no CssClass property of the column, only the control itself.
>





Eliyahu Goldin
  Reply With Quote
Old 12-30-2004, 11:14 PM   #8
Patrick Olurotimi Ige
 
Posts: n/a
Default Re: ASP.Net DataGrid Template column when inivisible

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!


Patrick Olurotimi Ige
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET VB Using ItemDataBound to create textbox in datagrid rows. smi59550 General Help Related Topics 0 01-18-2008 07:42 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46