![]() |
How to hide a column in datagrid?
Hi,
I am using a datagrid with databound columns. I want to set the width of one of the columns to zero. I use the following code in the design time. <ASP:BOUNDCOLUMN DATAFIELD="FieldName" HEADERSTYLE-WIDTH="0" ITEMSTYLE-WIDTH="0"> </ASP:BOUNDCOLUMN> But the column still appears when the page loads showing me the data. I do not want to use VISIBLE="False" because I want this column to be generated in the client side so that I can access it using JavaScript. Anyone has any clue? Thanks in advance, Ashish. |
Re: How to hide a column in datagrid?
This one works!!!!
Thank you Eliyahu :-) I am still wondering why does the code HEADERSTYLE-WIDTH="0" ITEMSTYLE-WIDTH="0" does not work? Thank you, Ashish. |
Re: How to hide a column in datagrid?
Ashish,
Use a css rule display:none. Eliyahu <ashtek@gmail.com> wrote in message news:1146125578.119949.312790@v46g2000cwv.googlegr oups.com... > Hi, > > I am using a datagrid with databound columns. I want to set the width > of one of the columns to zero. > I use the following code in the design time. > > <ASP:BOUNDCOLUMN DATAFIELD="FieldName" HEADERSTYLE-WIDTH="0" > ITEMSTYLE-WIDTH="0"> > </ASP:BOUNDCOLUMN> > > But the column still appears when the page loads showing me the data. > > I do not want to use VISIBLE="False" because I want this column to be > generated in the client side so that I can access it using JavaScript. > > Anyone has any clue? > > Thanks in advance, > Ashish. > |
Re: How to hide a column in datagrid?
Ashish,
Browsers have their own logic of setting column width. Your instructions are actually only recommendations. Eliyahu <ashtek@gmail.com> wrote in message news:1146134452.851402.39000@y43g2000cwc.googlegro ups.com... > This one works!!!! > Thank you Eliyahu :-) > I am still wondering why does the code HEADERSTYLE-WIDTH="0" > ITEMSTYLE-WIDTH="0" does not work? > Thank you, > Ashish. > |
RE: How to hide a column in datagrid?
hi
You dont have to set the column width to 0. Just uncheck the Visible checkBox for the Column in the Columns Option of the Property Builder Thanks Sekhar "ashtek@gmail.com" wrote: > Hi, > > I am using a datagrid with databound columns. I want to set the width > of one of the columns to zero. > I use the following code in the design time. > > <ASP:BOUNDCOLUMN DATAFIELD="FieldName" HEADERSTYLE-WIDTH="0" > ITEMSTYLE-WIDTH="0"> > </ASP:BOUNDCOLUMN> > > But the column still appears when the page loads showing me the data. > > I do not want to use VISIBLE="False" because I want this column to be > generated in the client side so that I can access it using JavaScript. > > Anyone has any clue? > > Thanks in advance, > Ashish. > > |
| All times are GMT. The time now is 04:43 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.