TextBox Event: OnTextChanged
The Gaia Ajax TextBox is more than a usual text box. Among other
features it gives you the ability to fire events when the user
enter something in it. This enables the Gaia TextBox to be used
e.g. as a filter and search input.
To enable these features, follow these steps:
- Set AutoPostBack = true
- Enable the OnTextChanged event
- Under the Misc section in the Properties, set KeyChangeEvents
= true
- Optional: Set KeyChangeEventsInterval (default:500ms), which
is the interval in milliseconds the TextBox will raise the TextChanged
event to the server
Markup (ASPX/.aspx)
1:
2: <b>Filter the list of tasks below:</b><br />
3: <gaia:TextBox ID="zFilter" runat="server" AutoPostBack="True"
4: KeyChangeEvents="True" OnTextChanged="zFilter_TextChanged"></gaia:TextBox>
5: <br /><br />
6: <gaia:Panel runat="server">
7: <asp:Repeater ID="zRepeater" runat="server">
8: <ItemTemplate>
9: <gaia:Label runat="server" Text='<%# Eval("ActivityName") + "|" %>' ></gaia:Label>
10: </ItemTemplate>
11: </asp:Repeater>
12: </gaia:Panel>
13: