DataGrid & ViewState & TemplateColumns
Posted on 2004-08-27
I'm using TemplateColumns to cut down on the amount of viewstate my datagrid takes up. I need my datagrid to be able to sort, so I can't completely disable the viewstate.
--This template column takes up no additional viewstate
<a href="#" onclick="someFunction('123456789);">Select</a>
--This template column takes up oogles of viewstate...The bound column is a value of 9 digits
<a href="#" onclick="someFunction('<%# DataBinder.Eval(Container.DataItem, "myColumn"')">Select</a>
I don't understand this, I'm not using a webcontrol, so I don't see how the datagrid can persist this in the viewstate, anyone offer any help as how I can get this to function correctly, without taking up a ton of viewstate?