Is it possible to add a column to a grid on the client-side?
I need to be able to create new columns and add them to a grid, I've already achieved this in the code behind but I want to move it to the client side because I'm getting the column names I want to use from a javascript call to the window opener.
Thanks,
Colette
Hi Colett,
You can't add a column on the client-side, but you can hide and show columns, as well as change the column header. I'm not sure what your scenario is but you may be able to simply store an extra hidden column on the client-side to be used when you need it.
Also, if you're using a window opener, you can pass the additional information in the querystring and parse that on the server-side. For instance
open("default2.aspx?action=addcolumn&column=price");
Hope this helps,
-Tony
Hi Tony,
I figured it wasn't possible from reading the documentation but just wanted to be sure.
I've ended up going with the second scenario where I pass the column names in the querystring. I was just trying to be lazy to avoid having to trawl through 12000 lines of uncommented, unindented Javascript to modify functions in order to pass out the names
I can certainly understand that...