Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, November 30, 2024 
 
slxdeveloper.com Community Forums  
   
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!
 Architect Forums - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: DataGrid.OnAddedRow doesn't fire.
Shawn O'Ferrall
Posts: 21
 
DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 9:53 AM
After adding a record to the underlying table, I simply want the datagrid to refresh and show the newly added record (something it should probably do on its own). The OnAddedRow event never fires. The OnDeletedRow does.

An F5 refreshes everything and shows my newly added record(s)...

v6.2.6 - I only have Add and Delete enabled in the Edit Options (Edit serves no funtion in my grid)

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 12:31 PM
Are you launching your "add" view via code or it that happening automatically from the EditView form selected for the grid?
[Reply][Quote]
Shawn O'Ferrall
Posts: 21
 
Re: DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 12:38 PM
The Add is being lauched by the grid - calling the 'EditView' plugin defined.

I submitted this to Sage - I talked to someone else who experienced this probem and I'm convinced it's a bug with the datagrid control.

I've found a way around it - it's ugly, but it works... On the FormClose for my Editview plugin, I call a refresh there like this:

Dim frmAccountDetail
Dim i

For i = 0 to Application.MainViews.Count - 1
If Application.MainViews.Item(i).Name = "System:Account Details" Then
Set frmAccountDetail = Application.MainViews.Item(i)
If Not (frmAccountDetail.TabsView Is Nothing) Then
If frmAccountDetail.TabsView.Name = "frmMarketingEvents" Then
frmAccountDetail.TabsView.dgEvents.Refresh
End If
End If
End If
Next

Set frmAccountDetail = Nothing
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Jun 07 12:42 PM
I have seen that before as well (and have used the same sort of code to refresh the grid).
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 07 9:11 AM
1. use an OnGridName_CHANGE_Event (this will become Add change in 7.01, different call).

2. Call it from both the onAdded and onEdited (even though you don't use it).

3. Include a grd.REFRESH in the call.

I don't have any trouble with this one, use it all of the time for calculations.....

4. Make sure that the Grid.SORTABLE = TRUE (load's the entire record set into the grid/memory, including the newly added row).

[Reply][Quote]
Michael Rogers
Posts: 70
 
Re: DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Oct 07 3:22 PM
Shawn,

I just ran into the same issue (I was getting an IDispatch.Invoke() error)with a datagrid upgraded from v6.2. In that case the problem was that the old event created a sub "myDGaddedrow(sender)". the 7.2 stub for that event is "myDGaddedrow(sender, key)". Once I made that change to my code, the event triigered without error.

I hope this helps someone.
[Reply][Quote]
Michael Rogers
Posts: 70
 
Re: DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Oct 07 3:23 PM
sorry, just read this was 6.2.6. may help someone though.
[Reply][Quote]
Aji
Posts: 1
 
Re: DataGrid.OnAddedRow doesn't fire.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jun 08 10:37 AM
This thread helped me...Thanks
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/30/2024 1:36:19 AM