Re: Field not updating in gridview unless visible?



Any control with Visible=false doesn't get rendered to the client and,
naturally, doesn't come back on postbacks. You can leave Visible=true and
hide with css rule display:none.

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


"et" <eagletender2001@xxxxxxxxx> wrote in message
news:e96$3ojPHHA.1276@xxxxxxxxxxxxxxxxxxxxxxx
In my gridview are the primary keys of the record that is being modified,
and obviously I have them hidden. However, when I try to use the update,
the id parameter -- or any field that is not visible -- does not come
across and the update fails since it's based on that id. Not sure that
quite makes sense to me, if I didn't want to update the field, I would
make it read only, visibility should have nothing to do with it. What is
the workaround to this?



.



Relevant Pages

  • Re: Pass value of hidden fields in Gridview to SQL parameter
    ... Columns with Visible=false don't render to the client and, naturally, don't ... come back to server with postbacks. ... css rule display:none while keeping Visible=true. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
  • Re: How to hide a GridView column?
    ... If you need the hidden column value to be available either on client side or ... after postbacks, hide it with a css rule display:none. ... Visible=false don't get rendered to the client and don't come back on ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: access to DataGrids TemplateColumn
    ... the controls with Visible=false don't get rendered to the client. ... you can't access them in postbacks. ... a css rule display:none, then you will see it in postbacks. ... > I'm trying to get access to template column when Update Command is fired, ...
    (microsoft.public.dotnet.framework.aspnet)
  • openssh 3.5p1: PATCH
    ... - sftp transaction logging ... control over whether the client can execute chmod, ...
    (comp.security.ssh)
  • Asp.net Important Topics.
    ... ASP.NET server controls contained within the page. ... A custom server control is ... can also perform validation using client script. ... Where does the Web page belong in the .NET Framework class hierarchy? ...
    (microsoft.public.dotnet.framework.aspnet)

Loading