Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. plz help me..... in gridview

plz help me..... in gridview

Scheduled Pinned Locked Moved ASP.NET
csharphelpcssasp-netdatabase
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sri_ashutosh
    wrote on last edited by
    #1

    plz help me..... i have to display data in gridview asp.net 2.0.problem is that one of my column contains text box in gird view?i have to update another column's value of gird view based on text box 's value of gird column, without sending it to server?lest we have three columns in grid view current price, discount (text box),and cusomter price .here suppose current price is 100 and user entering 10% discount then it should show 90 in customer price list without sending request to server or any update button event?i m using asp.net 2.0, c#, sql server200?

    S K 2 Replies Last reply
    0
    • S sri_ashutosh

      plz help me..... i have to display data in gridview asp.net 2.0.problem is that one of my column contains text box in gird view?i have to update another column's value of gird view based on text box 's value of gird column, without sending it to server?lest we have three columns in grid view current price, discount (text box),and cusomter price .here suppose current price is 100 and user entering 10% discount then it should show 90 in customer price list without sending request to server or any update button event?i m using asp.net 2.0, c#, sql server200?

      S Offline
      S Offline
      Sonia Gupta
      wrote on last edited by
      #2

      Try this one gridview1.rows[rowno][colno] = mathematical calculation

      Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.

      1 Reply Last reply
      0
      • S sri_ashutosh

        plz help me..... i have to display data in gridview asp.net 2.0.problem is that one of my column contains text box in gird view?i have to update another column's value of gird view based on text box 's value of gird column, without sending it to server?lest we have three columns in grid view current price, discount (text box),and cusomter price .here suppose current price is 100 and user entering 10% discount then it should show 90 in customer price list without sending request to server or any update button event?i m using asp.net 2.0, c#, sql server200?

        K Offline
        K Offline
        kiran_prakash
        wrote on last edited by
        #3

        this can be done using script. use the script function below.. function FindPrice(ctlCurrentPrice,txtDiscount,ctlCustomerPrice) { ctlCustomerPrice.innerText = Number(ctlCurrentPrice.innerText)- Number(ctlCurrentPrice.innerText)*Number(txtDiscount.value)/100); } and use the following code inside the RowDataBound event of gridview.. if (e.Row.RowType == DataControlRowType.DataRow) { TextBox txtDiscount = e.Row.FindControl("txtDiscount") as TextBox; txtDiscount.Attributes.Add("onchange", "FindPrice(" + e.Row.Cells[0].ClientID + ",this," + e.Row.Cells[2].ClientID + ")"); }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups