Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.Net DataGrid Template column when inivisible

Reply
Thread Tools

ASP.Net DataGrid Template column when inivisible

 
 
spidur1
Guest
Posts: n/a
 
      12-30-2004
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?

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      12-30-2004
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?
>



 
Reply With Quote
 
 
 
 
spidur1
Guest
Posts: n/a
 
      12-30-2004
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!

 
Reply With Quote
 
spidur1
Guest
Posts: n/a
 
      12-30-2004
It is not being rendered to the client. That's the problem. How do I
set the css rule?
Thanks for your help!

 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      12-30-2004
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!
>



 
Reply With Quote
 
spidur1
Guest
Posts: n/a
 
      12-30-2004
There is no CssClass property of the column, only the control itself.

 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      12-30-2004
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.
>



 
Reply With Quote
 
Patrick Olurotimi Ige
Guest
Posts: n/a
 
      12-30-2004

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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB 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
setting Column width of Template Column in Datagrid.. Charleees ASP .Net 2 06-20-2006 12:52 PM
DataGrid loses view state if first column is a template column. Ken Varn ASP .Net 1 08-19-2005 02:54 PM
how to know if a datagrid column is a template column? Dexter ASP .Net 1 01-18-2005 12:45 PM
ASP.Net DataGrid Template column when inivisible spidur1 ASP .Net 0 12-30-2004 05:17 PM
Bound Column or Template Column (w dAdapater?) in DataGrid Ravichandran Mahalingam ASP .Net Datagrid Control 0 01-09-2004 02:30 PM



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 47 48 49 50 51 52 53 54 55 56 57