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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Data Grid

Data Grid

Scheduled Pinned Locked Moved ASP.NET
csharpcssquestion
4 Posts 2 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.
  • K Offline
    K Offline
    kibromg 0
    wrote on last edited by
    #1

    Hi All, Can i have c sharp code for a datagrid that updates itself every to 10 seconds on a web page? So that data can be dispalyed as it get updated from a table. Thank you very much Regards

    N 1 Reply Last reply
    0
    • K kibromg 0

      Hi All, Can i have c sharp code for a datagrid that updates itself every to 10 seconds on a web page? So that data can be dispalyed as it get updated from a table. Thank you very much Regards

      N Offline
      N Offline
      newc1
      wrote on last edited by
      #2

      Can be done very simply using JS. Just perform the DataGrid's data binding in Page_Load and add this to the page within a script tag: setInterval("document.forms[0].submit();", 10000);

      Clean code is the key to happiness.

      K 2 Replies Last reply
      0
      • N newc1

        Can be done very simply using JS. Just perform the DataGrid's data binding in Page_Load and add this to the page within a script tag: setInterval("document.forms[0].submit();", 10000);

        Clean code is the key to happiness.

        K Offline
        K Offline
        kibromg 0
        wrote on last edited by
        #3

        Thank you very much for your response. I am not that good in JS.Do you think i should get the Java script code in Test.aspx ?where exactly? is it in the page _load event? Please advice. Thank you regards

        1 Reply Last reply
        0
        • N newc1

          Can be done very simply using JS. Just perform the DataGrid's data binding in Page_Load and add this to the page within a script tag: setInterval("document.forms[0].submit();", 10000);

          Clean code is the key to happiness.

          K Offline
          K Offline
          kibromg 0
          wrote on last edited by
          #4

          Hi, Thank for your response.Let me expain it a bit further Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e. every 5 seconds, i just want to refresh it ONLY on server change just like desktop applications do. The problem is that refreshing evry n seconds has to much impact on my web server. The refresh action should be taken only when something really happens that makes sense Is it possible ?

          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