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. C#
  4. how to implement the Refresh action using C#

how to implement the Refresh action using C#

Scheduled Pinned Locked Moved C#
csharptutorial
5 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.
  • T Offline
    T Offline
    tonyjsebastian1
    wrote on last edited by
    #1

    hello all we have seen in windows refresh by rght click on mouse or by using the F5 key ... how is this possible in C# for an application. thanks tony

    C B 2 Replies Last reply
    0
    • T tonyjsebastian1

      hello all we have seen in windows refresh by rght click on mouse or by using the F5 key ... how is this possible in C# for an application. thanks tony

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      By writing some code. Handle the key event, work out the user pressed f% and reload whatever data you're displaying.

      Christian Graus Driven to the arms of OSX by Vista.

      T 1 Reply Last reply
      0
      • C Christian Graus

        By writing some code. Handle the key event, work out the user pressed f% and reload whatever data you're displaying.

        Christian Graus Driven to the arms of OSX by Vista.

        T Offline
        T Offline
        tonyjsebastian1
        wrote on last edited by
        #3

        hello Christian Graus can u illustrate some sample codes plz thanks Tony

        1 Reply Last reply
        0
        • T tonyjsebastian1

          hello all we have seen in windows refresh by rght click on mouse or by using the F5 key ... how is this possible in C# for an application. thanks tony

          B Offline
          B Offline
          beatles1692
          wrote on last edited by
          #4

          Hi I think first you should define the meaning of Refresh for you application.(What) For example, if there is a form that shows a list of customers ,Refresh might be to refill the list .If it's a data entry from you might want to refresh your look up fields that might have been changed by some other users and so on. Then you should decide when this refresh should happen(When). There might be a refresh button on the form or a shortcut key or when user opens a drop down.In either of these cases, you want to handle an event to do the Refresh. For example: We have a method called RefillCustomers that refill customers list and we want a refresh button that do the refresh. The simplest way to make it work it's something like this: handle button clicked event(in form load for example)

          refreshButon.Click+=new EventHandler(RefreshButtonClicked);

          then we should implement RefreshButtonClicked method:

          private void RefreshButtonClicked(object sender,EventArgs e)
          {
          RefillCustomers();
          }

          and then you should implement the RefillCustomers method.

          T 1 Reply Last reply
          0
          • B beatles1692

            Hi I think first you should define the meaning of Refresh for you application.(What) For example, if there is a form that shows a list of customers ,Refresh might be to refill the list .If it's a data entry from you might want to refresh your look up fields that might have been changed by some other users and so on. Then you should decide when this refresh should happen(When). There might be a refresh button on the form or a shortcut key or when user opens a drop down.In either of these cases, you want to handle an event to do the Refresh. For example: We have a method called RefillCustomers that refill customers list and we want a refresh button that do the refresh. The simplest way to make it work it's something like this: handle button clicked event(in form load for example)

            refreshButon.Click+=new EventHandler(RefreshButtonClicked);

            then we should implement RefreshButtonClicked method:

            private void RefreshButtonClicked(object sender,EventArgs e)
            {
            RefillCustomers();
            }

            and then you should implement the RefillCustomers method.

            T Offline
            T Offline
            tonyjsebastian1
            wrote on last edited by
            #5

            hello beatles1692 thanks for u r answer thanks Tony

            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