TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajkumar R
NA
26
3.6k
Gridview- Client Side Calculation using javascript
Aug 23 2017 8:27 AM
Hi,
I have a gridview with ITEM TEMPLATES for 12 fields, for each collumn set of calculations are there based on rows. Can you please provide me the sample code in JAVASCRIPT
LOOP THROUGH THE GRIDVIEW TEXTBOXES AND GET THE VALUE AND DO THE CALCULATION AND SHOW THE RESULT IN ONE OF THE ROWS.
Example :
If am in Cell 7, will take the value of Row1 + Row 2 - Row 7 - Row 9 and the total should be shown in Tow 12 of Cell 7
<asp:GridView ID="grdCIP" runat="server" GridLines="both"
AutoGenerateColumns="False"
forecolor="Black"
onrowdatabound="grdCIP_RowDataBound" DataKeyNames="CIP_CategoryId"
onrowcreated="grdCIP_RowCreated">
<asp:TemplateField HeaderText="Jan">
<ItemTemplate>
<asp:TextBox ID="txtJan" runat="server" Width="50px" Text='<%# Eval("Jan") %>' > </asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
Reply
Answers (
2
)
Combining multiple website in single portal
hyperLinkField value to pass to textbox on different page