Hi,
I have a very strange problem with the ViewState when I use the RadGrid.
Example code:
I also use a browser file with the following code.
When you view the sourcecode of the page, the ViewState is only a few bytes.
Now when I change the ButtonType in the GridEditCommandColumn to ImageButton, the ViewState increases to several kB's.
Disabling ViewState on the RadGrid won't help. Creating my own edit command colums with an image button doesn't fix it either.
Why is this?
And what can I do to keep my ViewState small?
Thanks,
Mark
I have a very strange problem with the ViewState when I use the RadGrid.
Example code:
| <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" |
| DataSourceID="EntityDataSource1" GridLines="None"> |
| <MasterTableView datakeynames="ProductID" datasourceid="EntityDataSource1"> |
| <Columns> |
| <telerik:GridEditCommandColumn ButtonType="LinkButton"> |
| </telerik:GridEditCommandColumn> |
| <telerik:GridBoundColumn DataField="Name" HeaderText="Name" |
| SortExpression="Name" UniqueName="Name"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
I also use a browser file with the following code.
| <browsers> |
| <browser refID="Default"> |
| <controlAdapters> |
| <adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadSessionPageStateCompression" /> |
| </controlAdapters> |
| </browser> |
| </browsers> |
When you view the sourcecode of the page, the ViewState is only a few bytes.
Now when I change the ButtonType in the GridEditCommandColumn to ImageButton, the ViewState increases to several kB's.
Disabling ViewState on the RadGrid won't help. Creating my own edit command colums with an image button doesn't fix it either.
Why is this?
And what can I do to keep my ViewState small?
Thanks,
Mark
