Do you support hiding a column yet in the WebDatGrid? In November you said you were planning to put it into a future release. If not, do you have a slated release for this.
I am currently setting visible column widths to exactly match my grid width and then setting my primary key column equal to 0. This is working but not a desirable solution.
I'm hiding a column by doing this:
WebDataGrid1.Columns[...column_index_here...].Hidden = true;
PS: I'm using version 10.2 and dynamically generating my columns at runtime (not sure if this has anything to do with the fact that I can hide a column).
Please mark this as answered if it has helped you.
Cheers,
Wagner Danda da Silva
http://www.wagnerdanda.me
I'm doing something like this but it coughs up an object not set to an instance of an object error when I run it. The datasource is being set and I'm doing .databind() right before I try to hide certain columns. Is there soemthing else I need to do to actually have the datagrid generate the columns?
Hi obrienm,
When you databind, we do generate columns, but these autogenerated ones are not available on the server. The items in the Columns collection are ones from the aspx or ones explicitly added in the code-behind.
regards,David Young
So to hide columns in code behind i have to manually go through and add them instead of having them autogenerated on the databind?
That is correct. In order to access columns on the server, you must define them. You can access autogenerated columns on the client.
-Dave
OK Gotcha. Thanks for the clarification.
Hi Obrien,
On both situations (Autogenerated columns set to true or false) you can done it at client end script. That will be much better and easier.
Regards,
Assyst