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. General Programming
  3. Windows Forms
  4. Which function trigger to load next set of data when user scroll datagridview c#

Which function trigger to load next set of data when user scroll datagridview c#

Scheduled Pinned Locked Moved Windows Forms
csharpcssdatabasecomhelp
2 Posts 2 Posters 13 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.
  • T Offline
    T Offline
    Tridip Bhattacharjee
    wrote on last edited by
    #1

    I am working with datagridview. My datagridview virtual mode is turned on.so i populate grid this below way

    private void dataGridView1_CellValueNeeded(object sender,DataGridViewCellValueEventArgs e)
    {
    e.Value = memoryCache.RetrieveElement(e.RowIndex, e.ColumnIndex);
    }

    basically i took the code from a msdn link and customize bit. one thing is not clear to me which function is getting called first when user scroll datagridview. please tell me the function name. also tell me how relation has been established between datagridview scroll and function call to load next set of data. here i am not posting my full code rather here leaving a url from where anyone can see the full working code. here is the url http://stackoverflow.com/questions/31458197/how-to-sort-datagridview-data-when-virtual-mode-enable/31475803#31475803 please have a look and help me to understand the area which is getting called when user scroll down the datagridview. thanks

    tbhattacharjee

    L 1 Reply Last reply
    0
    • T Tridip Bhattacharjee

      I am working with datagridview. My datagridview virtual mode is turned on.so i populate grid this below way

      private void dataGridView1_CellValueNeeded(object sender,DataGridViewCellValueEventArgs e)
      {
      e.Value = memoryCache.RetrieveElement(e.RowIndex, e.ColumnIndex);
      }

      basically i took the code from a msdn link and customize bit. one thing is not clear to me which function is getting called first when user scroll datagridview. please tell me the function name. also tell me how relation has been established between datagridview scroll and function call to load next set of data. here i am not posting my full code rather here leaving a url from where anyone can see the full working code. here is the url http://stackoverflow.com/questions/31458197/how-to-sort-datagridview-data-when-virtual-mode-enable/31475803#31475803 please have a look and help me to understand the area which is getting called when user scroll down the datagridview. thanks

      tbhattacharjee

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Tridip Bhattacharjee wrote:

      one thing is not clear to me which function is getting called first when user scroll datagridview.

      You should read more of what is one MSDN, as it explains the topic quite well. The "ValueNeeded" event is called for each cell that needs painting, regardless of what causes the paint; whether that is a scroll, or maximizing the form. If the grid needs values, that event is fired.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      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