Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

I have a main form which contains a listview, datetimepicker and a "Change Date" button. When the form is displayed, the listview is populated with datarows from the database based upon the selected date from the datetimepicker.

 

When the user clicks the "Change Date" button a small popup form is displayed which allows the user to select a new date and update the database with this value. When the user clicks "Save" on the popup form, the date is saved and the popup closes.

 

I would like to add a command to the "Save" procedure on the popup form which will cause the listview on the main form to refresh with the new values in the database. I am not exactly sure how to go about this.

 

Hopefully that makes sense.

 

Thank you!

  • Administrators
Posted
You would need to either pass a reference from the main form to the pop-up form so the popup knows which form to update (look here for more info on that), or alternatively in the Main Form's button click event read the selected value from the popup (you could always expose the selection as a property) and act on it after the 'Save' button has been clicked.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...