Is there a way to hide columns in server side using AutoGenerateColumns as True?
If I use a BoundDataField for the columns I want to hide and those columns are shown twice and when I set the property Hide to True I got the following error:
Even when I hide a column with js I got the same error.
What can I do?
Hello,if you are using BoundDataField for the columns, you should set AutoGenerateColumns to false. That's why your columns are shown twice.I believe you are getting the error because you're using <%= %>. Try using <%# %>.Regards,Nikolai Dimitrov
Hello Nikolai I still having this issue
I have AutoGenerateColumns set to true and I need it this way one of the columns is an Id and I don't want the user to see this info but I need it to identify each row to update date by this Id or some other things
So I haven't found a way to hide this columns if AutoGenerateColumns is false
You should be able to hide columns in your code-behind, for instance in your Page_Load method:
WebDataGrid1.Columns.FromKey("ID").Hidden = true;
Note that the grid should be dataBound prior to hiding columns when using auto column generation.
Please contact me if you have any questions.
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://www.infragistics.com/support
No such luck. When attempting to manipulate the Columns collection immediately after .DataBind(), it is still empty (.Count =- 0) when AutoGenerateColumns = True.
It would be extremely helpful to be able to hide a column based on its name while still allowing the Grid to generate the columns for me based on the data provided.
Can you suggest anything else?
Any response on this yet?
I am also trying to do this but get the same issue.