The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Refresh datagrid from another form
Posted: 07 Feb 08 9:41 AM
|
If I launch an add/edit form (frmAddEditSpouse) from a datagrid (grdSpouse on form frmSpouse), is it possible to refresh the parent datagrid from the add/edit form? On my add/edit form, I have a "Save & Clear" button to facilitate adding multiple spouses to a contact record. As each spouse is added, I'd like to refresh the datagrid from the other form. Thanks!
C. Burriss |
|
|
|
Re: Refresh datagrid from another form
Posted: 07 Feb 08 10:06 AM
|
Ok I won't even start with the questions of Multiple spouses....
Just call the form name fomr the forms collection and then call the datagrid and refresh it on the Save & Clear click. |
|
|
|
Re: Refresh datagrid from another form
Posted: 07 Feb 08 3:13 PM
|
Hehe.
Thank you very much for pointing me in the right direction. It worked like a charm. Also, I'd like to thank Ryan for the article "How To Update Controls Across Forms". I certainly started off trying to use the LAN Developer's Reference example ...
Set Form = Application.Forms(“:”) Form...
It didn't go over well. |
|
|
|
Re: Refresh datagrid from another form
Posted: 16 Apr 08 9:21 AM
|
RJ Could you give me a little assistance with this? I have an Account Pending Orders tab. I click on the pending order and it takes me to the order details, etc. I mark the order "Installed" which should change the status to "Installed" from "Pending" in the Account Pending Orders tab. But when I go back to the Account Pending Orders tab the status is still pending until I press F5. Would this solution you talked about here work for this instance? If so could you give more guidance? Thanks! Tanya |
|
|
| |
|
Re: Refresh datagrid from another form
Posted: 28 Apr 09 8:59 PM
|
I'm trying use your code, but it not work. I received this message: "Object Required:'frm'"
My code: Dim frm
set frm = Application.Forms("frmOppProducts") frm.grdProducts.Refresh
frmOppProducts is a tab in Opportunity. Family: Opportunity Plug-in:Products
SLX v7.2.0 |
|
|
|
Re: Refresh datagrid from another form
Posted: 28 Apr 09 9:19 PM
|
You have missed out family in your code:
set frm = Application.Forms("Opportunity:frmOppProducts")
Also, is 'frmOppProducts' the internal form name, or the name of the plugin? You need to use the plugin name. |
|
|
|
Re: Refresh datagrid from another form
Posted: 28 Apr 09 9:39 PM
|
Hi Phil!
Previously, I had tried to use the family and the name of the component, but also received the same error message.
Check: Dim frm
set frm = application.Forms("Opportunity:Products") frm.grdProducts.Refresh |
|
|
|
Re: Refresh datagrid from another form
Posted: 28 Apr 09 9:59 PM
|
OK, time to do some debugging. Try running this (untested) to give you a messagebox showing each form name. Add a button to the form to run it.
Sub FormTest Dim objForm Dim i, strFormName
For i = 0 to Application.Forms.Count Set objForm = Application.Forms.Item(i) strFormName = objForm.Name MsgBox strFormName Next End Sub
|
|
|
|
Re: Refresh datagrid from another form
Posted: 28 Apr 09 10:14 PM
|
The code show the name of the following forms: - frmOpportunityDetail - frmProductMoreDetail --> Customization (Tab) - frmAddProductMoreDetail --> Customization (Form to add data) |
|
|
|
Re: Refresh datagrid from another form
Posted: 28 Apr 09 10:26 PM
|
Phil, i restarted the SalesLogix and this work perfectly!
But, the Datagrid Refresh not work. When i click in the Product tab, the values in the Datagrid not changes. I had to refresh (CRTL + F5) the SLX to see new values in the Product Datagrid. |
|
|
|