When I press enter in a textbox, it is calling the "FilterGridView" and then it calls the button event.
<div class="TextRight">
<asp:TextBox ID="txtBuscaNome" runat="server" CssClass="text_field upper-case" OnTextChanged="FiltroGridView" />
</div>
I do not know if I formulated the question well, because I'm doing it this way but I do not know if it's the right one.
I created a hidden
<asp:HiddenField ID="hfGrid" runat="server" />
And at the end of the "FilterGridView" I put the value = 1
hfData.Value = "1";
And I see if it is 1 in the button event. (Because it always goes here in the submit)
if (hfData.Value == "1")
return