Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Hiding and Showing Columns in Editable GridView

Reply
Thread Tools

Hiding and Showing Columns in Editable GridView

 
 
=?Utf-8?B?Sm9zaCBTY2htaWR0?=
Guest
Posts: n/a
 
      03-21-2007
I have a gridview that is being used for managing inventory. The default
view shows the stock currently available. When editing I don't want the
stock to be directly edited, rather the user will enter the amount of items
being added/removed.

When the user clicks the 'Edit' link I want to hide the stock column and
display a field for the TransactionAmt. I'm using the RowUpdating event to
execute some functions used by that field. I've added the column and am
showing/hiding using the visible property, which works fine for that, but
when I hide the stock column I can no longer access the value that was in
that field.

Any suggestions?
 
Reply With Quote
 
 
 
 
Liming
Guest
Posts: n/a
 
      03-22-2007
In yoru gridview, editTemplate, simply just make the textbox disabled,
then you shall be able to get teh value later on.

Hope that helps.

Liming Xu
Jumptree Project Management
www.jumptree.com

On Mar 21, 4:15 pm, Josh Schmidt
<(E-Mail Removed)> wrote:
> I have a gridview that is being used for managing inventory. The default
> view shows the stock currently available. When editing I don't want the
> stock to be directly edited, rather the user will enter the amount of items
> being added/removed.
>
> When the user clicks the 'Edit' link I want to hide the stock column and
> display a field for the TransactionAmt. I'm using the RowUpdating event to
> execute some functions used by that field. I've added the column and am
> showing/hiding using the visible property, which works fine for that, but
> when I hide the stock column I can no longer access the value that was in
> that field.
>
> Any suggestions?



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      03-22-2007
Any web control with Visible=false doesn't get rendered to the client and,
naturally, doesn't come back in postbacks. If you are interested in the
hidden value either on client side or in postbacks, hide with a css rule
display:none.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"Josh Schmidt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I have a gridview that is being used for managing inventory. The default
> view shows the stock currently available. When editing I don't want the
> stock to be directly edited, rather the user will enter the amount of
> items
> being added/removed.
>
> When the user clicks the 'Edit' link I want to hide the stock column and
> display a field for the TransactionAmt. I'm using the RowUpdating event
> to
> execute some functions used by that field. I've added the column and am
> showing/hiding using the visible property, which works fine for that, but
> when I hide the stock column I can no longer access the value that was in
> that field.
>
> Any suggestions?



 
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
Hiding columns in GridView Control =?Utf-8?B?c3Jpbml2YXM=?= ASP .Net 6 04-17-2009 05:09 PM
Binded Datagrid Formatting columns or hiding columns ton ASP .Net Web Controls 2 02-11-2004 04:09 AM
Hiding and Showing Columns in the DataGrid Control... Amber ASP .Net Datagrid Control 1 10-11-2003 07:17 PM
Hiding and Showing Columns in the DataGrid Control... Amber ASP .Net 1 10-11-2003 07:17 PM
Hiding and Showing Columns in the DataGrid Control... Amber ASP .Net Web Controls 1 10-11-2003 07:17 PM



Advertisments