Which ajax feature allows me to do calculations ?
On Feb 3, 9:35 am, KeidrickP <[email protected]> wrote: > try ajax > > > > On Wed, Feb 3, 2010 at 11:30 AM, aric <[email protected]> wrote: > > I have two textbox and a label inside a gridview. I want the label to > > be updated as soon as a number is typed into the textbox. I dont want > > to use the OnTextChange because that will postback every time. how can > > I do the calculation using Javascript ? > > > My Code: > > > <asp:GridView runat="server" ID="gvOB" > > AutoGenerateColumns="false" DataKeyNames="CID" > > ShowHeader="true" HeaderStyle-Wrap="True" CellPadding="2" > > ForeColor="#333333" > > GridLines="None" Width="100%" RowStyle-HorizontalAlign="Left" > > HorizontalAlign="Center" EmptyDataText="No Actions" ShowFooter="True"> > > <RowStyle BackColor="#EFF3FB" /> > > > <Columns> > > <asp:BoundField DataField="CID" HeaderText="#" > > HeaderStyle-HorizontalAlign="Center" ItemStyle- > > horizontalAlign="Right" /> > > <asp:BoundField DataField="Descr" HeaderText="Clinical > > Interactions & Professionalism" HeaderStyle-HorizontalAlign="Center" / > > > <asp:TemplateField HeaderText="Midterm" HeaderStyle- > > HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> > > <ItemTemplate> > > <asp:TextBox runat="server" ID="txtMidterm" > > TextMode="SingleLine" Width="25px" MaxLength="1" > > OnTextChanged="OnTextChanged"></asp:TextBox> > > <cc1:FilteredTextBoxExtender runat="server" > > ID="ftbMidterm" TargetControlID="txtMidterm" FilterType="Numbers" /> > > </ItemTemplate> > > <FooterTemplate> > > <asp:Label runat="server" ID="TotalMidterm" /> > > </FooterTemplate> > > </asp:TemplateField> > > > <asp:TemplateField HeaderText="Final" HeaderStyle- > > HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> > > <ItemTemplate> > > <asp:TextBox runat="server" ID="txtFinal" > > TextMode="SingleLine" Width="25px" MaxLength="1"></asp:TextBox> > > <cc1:FilteredTextBoxExtender runat="server" > > ID="ftbFinal" TargetControlID="txtFinal" FilterType="Numbers" /> > > </ItemTemplate> > > <FooterTemplate> > > <asp:Label runat="server" ID="TotalFinal" /> > > </FooterTemplate> > > </asp:TemplateField> > > > <asp:TemplateField HeaderText="Cumulative" HeaderStyle- > > HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"> > > <ItemTemplate> > > <asp:Label runat="server" ID="lblCumulative" /> > > </ItemTemplate> > > <FooterTemplate> > > <asp:Label runat="server" ID="Grade" /> > > </FooterTemplate> > > </asp:TemplateField> > > > </Columns> > > </asp:GridView> > > -- > Keidrick Pettaway > > http://kpettaway.com
