I have the exact same declarations and code behind on another page that works fine. I copied the declaration and code to the master page and changed the names of the controls involved and this event is not firing.
Here is the aspx code
<asp:GridView ID="GridChat" runat="server" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" DataKeyNames="ID" >
<Columns>
<asp:CommandField ShowDeleteButton="True" />
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
...
Go to the complete details ...