List Info

Thread: RE: Visible=False in DataGrid & GridView




RE: Visible=False in DataGrid & GridView
country flaguser name
United States
2007-03-04 08:15:49
Eric
WHy have you not unchecked the automatic created columns and
then just 
created the column that you need.
----- Original Message ----- 
From: "eric van buren" <ericvanburenmsn.com>
To: <aspnet-datadisplaycontrolsaspadvice.com>
Sent: Saturday, March 03, 2007 4:59 PM
Subject: [aspnet-datadisplaycontrols] Visible=False in
DataGrid & GridView


>I have a datagrid in an older 1.1 app where a large
number of the columns
> have the property set visible=false.  Do these columns
actually become
> rendered and databound in the Datagrid and just aren?t
visible to the user
> thus making the viewstate large or are they just not
created at all?  Is
> this behavior any different with a GridView?  Ideally,
I would like to 
> have
> have my grid just not create these columns at all when
not needed to 
> improve
> performance but dynamically creating them seems like a
lot of work.
>
>
>
> Thanks.
>
>
>
>
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com
> 



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

RE: Visible=False in DataGrid & GridView
country flaguser name
United States
2007-03-04 18:36:46
The grid is a set of search results created based on user
input from a
search form. The user has a set of fields they can select to
perform a
search and the fields in the grid/search results are the
same as those the
user selects.  I don't know if it would be ok to hide those
fields not
selected or dynmically create only those fields selected.
Thanks 

-----Original Message-----
From: Allen Moon [mailto:howlmoonclearwire.net] 
Sent: Sunday, March 04, 2007 9:16 AM
To: aspnet-datadisplaycontrolsaspadvice.com
Subject: [aspnet-datadisplaycontrols] RE: Visible=False in
DataGrid &
GridView

Eric
WHy have you not unchecked the automatic created columns and
then just 
created the column that you need.
----- Original Message ----- 
From: "eric van buren" <ericvanburenmsn.com>
To: <aspnet-datadisplaycontrolsaspadvice.com>
Sent: Saturday, March 03, 2007 4:59 PM
Subject: [aspnet-datadisplaycontrols] Visible=False in
DataGrid & GridView


>I have a datagrid in an older 1.1 app where a large
number of the columns
> have the property set visible=false.  Do these columns
actually become
> rendered and databound in the Datagrid and just aren?t
visible to the user
> thus making the viewstate large or are they just not
created at all?  Is
> this behavior any different with a GridView?  Ideally,
I would like to 
> have
> have my grid just not create these columns at all when
not needed to 
> improve
> performance but dynamically creating them seems like a
lot of work.
>
>
>
> Thanks.
>
>
>
>
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com
> 



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

RE: Visible=False in DataGrid & GridView
country flaguser name
United States
2007-03-04 22:04:40
Anytime the visibility property is set to false on any
server control then
that control is not rendered.
If you wish to remove a column programmatically you can use
the RemoveAt
method of the datagrid columns (ver 1.x),
dgResults.Columns.RemoveAt(3).  If I remember correctly you
have to do this
after the databinding; but once removed the relationship is
gone and so is
the viewstate for that column (I could be wrong on viewstate
since I never
really checked).  

Now if those data columns are never used then I would
optimize the data
query and remove them.

Pam




-----Original Message-----
From: Allen Moon [mailto:howlmoonclearwire.net] 
Sent: Sunday, March 04, 2007 6:16 AM
To: aspnet-datadisplaycontrolsaspadvice.com
Subject: [aspnet-datadisplaycontrols] RE: Visible=False in
DataGrid &
GridView


Eric
WHy have you not unchecked the automatic created columns and
then just 
created the column that you need.
----- Original Message ----- 
From: "eric van buren" <ericvanburenmsn.com>
To: <aspnet-datadisplaycontrolsaspadvice.com>
Sent: Saturday, March 03, 2007 4:59 PM
Subject: [aspnet-datadisplaycontrols] Visible=False in
DataGrid & GridView


>I have a datagrid in an older 1.1 app where a large
number of the 
>columns  have the property set visible=false.  Do these
columns 
>actually become  rendered and databound in the Datagrid
and just aren?t 
>visible to the user  thus making the viewstate large or
are they just 
>not created at all?  Is  this behavior any different
with a GridView?  
>Ideally, I would like to  have  have my grid just not
create these 
>columns at all when not needed to  improve
> performance but dynamically creating them seems like a
lot of work.
>
>
>
> Thanks.
>
>
>
>
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com
> 



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com



Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )