Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > How to reference hidden columns

Reply
Thread Tools

How to reference hidden columns

 
 
David L
Guest
Posts: n/a
 
      05-28-2004
I'm trying to reference a hidden key column in my datagrid control without
success. I've set the columns up at design time through the property
builder, and I've set my key column's visible property to false. In my
updatecommand event I need to reference the key value for the update but I
can't get anything but an empty string when I reference
e.items.cells(1).text

Thanks in advance


 
Reply With Quote
 
 
 
 
Rick Spiewak
Guest
Posts: n/a
 
      05-28-2004
If a column's visible property is set to false, it doesn't render, and won't
participate in viewstate or postback. Get the key value from the dataset or
datatable instead.

"David L" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to reference a hidden key column in my datagrid control without
> success. I've set the columns up at design time through the property
> builder, and I've set my key column's visible property to false. In my
> updatecommand event I need to reference the key value for the update but I
> can't get anything but an empty string when I reference
> e.items.cells(1).text
>
> Thanks in advance
>
>



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      05-30-2004
You can get the hidden column value even on client side if you hide the
column with attribute display:none in a stylesheet.

Eliyahu

"Rick Spiewak" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If a column's visible property is set to false, it doesn't render, and

won't
> participate in viewstate or postback. Get the key value from the dataset

or
> datatable instead.
>
> "David L" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I'm trying to reference a hidden key column in my datagrid control

without
> > success. I've set the columns up at design time through the property
> > builder, and I've set my key column's visible property to false. In my
> > updatecommand event I need to reference the key value for the update but

I
> > can't get anything but an empty string when I reference
> > e.items.cells(1).text
> >
> > Thanks in advance
> >
> >

>
>



 
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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Populate Hidden field on post back and retrieve value from Hidden Field Rick ASP .Net 3 04-13-2010 05:38 PM
Win 7 folders hidden despite 'show hidden' checked Boppy NZ Computing 10 01-23-2010 02:56 AM
GridView controls and hidden columns Mark Rae ASP .Net 2 05-14-2006 07:55 PM
How would I discover the text in a block element hidden by overflow:hidden style being set? SolarCanine Javascript 2 09-20-2005 06:27 PM



Advertisments