I've already posted this to DevExpress support, but since I honestly have zero confidence in their ability to resolve the problem, I'm posting it here.
I have a User Control containing a ASPxGridView whose first column I need to hide depending upon the value of a property defined on the control. The property takes the value passed in and assigns it to the Visible property of the grid.
On one page, I have this property set to True; the other, False. When I visit the page where the column should be hidden first and navigate to the other page, the column stays hidden. When I visit the page where it should be visible first and then navigate to the other page, it throws an error b/c the column is defined as such:
<dx:GridViewDataTextColumn Caption="Employee" FieldName="TSLinkText" VisibleIndex="0">
<DataItemTemplate>
<a href='<%#GlobalHelper.GetTimesheetURL(Eval("TimesheetID"), Eval("EmployeeID"), Eval("HasTSLink")) %>'
title='View the current timesheet for <%#Eval("TSLinkText")%>'>
<%#IIf(Eval("HasTSLink") = -1, Eval("TSLinkText"), "")%></a>
<%#IIf(Eval("HasTSLink") = 0, Eval("TSLinkText"), "")%>
</DataItemTemplate>
<CellStyle Wrap="False" />
</dx:GridViewDataTextColumn>
I've got a different datasource defined on each page, and on the page where the column is hidden, the procedure that retrieves the data does not have a "HasTSLink" field, which is why the error is thrown.
To me, it seems like the User Control is being cached. I tried a few different approaches, including adjusting the VaryByControls property for Partial Caching, but nothing has worked so far.