I have a module with one gridview. The grid has four columns and one command field, the select command. It is a grid that displays information on a basic search page. The user types in some criteria in a text box, selects some values on a few drop downs, and the grid displays the result.
This module is for public search purposes, hence, should NOT have any permissions restricting use of the module to the general public.
I want to perform an action when the user selects a row in the grid. I have added some code to the rowcommand event handler, however, when I'm not logged in as a registerd user on the site, the rowcommand event does not fire each time you click on the select command in the grid.
To reproduce the problem:
<table>
<tr>
<td>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="odsMain">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="Field1" HeaderText="Field1" SortExpression="Field1" />
</Columns>
</asp:GridView>
</td>
</tr>
</table>
<asp:ObjectDataSource ID="odsMain"
runat="server"
SelectMethod="SelectMethodMain"
TypeName="PracticalComforts.Modules.LSTResults.LSTResultsController"
OldValuesParameterformatString="original_{0}">
</asp:ObjectDataSource>
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
MsgBox("row")
End Sub
This is what I have found out with my testing:
- When I logged in as a registered user (either host or any user), I can click on any row in the grid and the msgbox pops up (i.e. rowcommand fired)
- When I'm not logged in, the rowcommand does fire after about one minute.... Yes, I was staring at the screen trying to figure it out, randomly clicking around in the grid when the msgbox eventually did pop up. I then proceeded to get a stop watch and timed the msgbox coming up whilst clicking around in the grid. The times differed from 60 to 150 seconds.
This has to be a permission/security issue because the behaviour is 100% predictable when I'm logged in.
Any ideas?
Thanks
Michelle