K
kbrandl
On my page, there is a textbox at the top that contains a date -- and a
fully-editable datagrid below (each row in the datagrid contains an
editable textbox, along with some other controls).
The date textbox is defined as:
<asp:TextBox EnableViewState="True" ID="HoursWorkedDate_TextBox"
Runat="server" width="80px" CssClass="inputstyle"
onBlur='javascript:Search.submit();' OnTextChanged="Date_Changed" />
When the date is changed, and the textbox loses focus (onBlur), the
page is submitted, causing the OnTextChanged event to fire and the
server-side "Date_Changed" method to execute. This is working
correctly.
Each textbox within the fully-editable datagrid is defined as follows:
<asp:TextBox Width="40px" CssClass="inputstyle" MaxLength="4"
ID="HoursWorked_TextBox" Runat="server" Value='<%#
DataBinder.Eval(Container.DataItem, "UpdateHoursWorked")%>'
OnTextChanged="DG_RowChanged" />
I would expect that if I change data within the textboxes of the
editable datagrid, and the page is submitted, the OnTextChanged event
would fire for any changed rows. This works fine if I submit the page
by clicking the submit button...but not if the page submits by the Date
textbox at the top of the page being changed.
If I change the data within the data grid, then change the date at the
top of the page and hit ENTER, the page refreshes -- but only the
OnTextChanged event associated with the Date textbox fires...the
OnTextChanged events associated with the datagrid textboxes do NOT
fire. What am I doing wrong here???
fully-editable datagrid below (each row in the datagrid contains an
editable textbox, along with some other controls).
The date textbox is defined as:
<asp:TextBox EnableViewState="True" ID="HoursWorkedDate_TextBox"
Runat="server" width="80px" CssClass="inputstyle"
onBlur='javascript:Search.submit();' OnTextChanged="Date_Changed" />
When the date is changed, and the textbox loses focus (onBlur), the
page is submitted, causing the OnTextChanged event to fire and the
server-side "Date_Changed" method to execute. This is working
correctly.
Each textbox within the fully-editable datagrid is defined as follows:
<asp:TextBox Width="40px" CssClass="inputstyle" MaxLength="4"
ID="HoursWorked_TextBox" Runat="server" Value='<%#
DataBinder.Eval(Container.DataItem, "UpdateHoursWorked")%>'
OnTextChanged="DG_RowChanged" />
I would expect that if I change data within the textboxes of the
editable datagrid, and the page is submitted, the OnTextChanged event
would fire for any changed rows. This works fine if I submit the page
by clicking the submit button...but not if the page submits by the Date
textbox at the top of the page being changed.
If I change the data within the data grid, then change the date at the
top of the page and hit ENTER, the page refreshes -- but only the
OnTextChanged event associated with the Date textbox fires...the
OnTextChanged events associated with the datagrid textboxes do NOT
fire. What am I doing wrong here???