Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 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: Data Grid Column Update Problem
Robert Levine
Posts: 132
 
Data Grid Column Update ProblemYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Nov 06 11:01 AM
fiogf49gjkf0d
We've built a custom version of the Opportunity Products' Products Grid which includes a date column with a Date-Picker Calendar Control drop down for cell updating purposes. When a user uses this facility to change a date, the call focus remains after a new date has been selected. That is, the focus remains on the updated date cell. Trouble is, when a user clicks on the 'next record' arrow on the Lookup Bar to navigate to the next Opportunity, the previously updated date is not updated in the database and an error is generated. Question: how can I force the focus out of the updated cell after a new value selection. Anyone suggesting I stand over a user with a ruler in hand doesn't get any Turkey on Thursday.
[Reply][Quote]
Mark R. Bailey
Posts: 16
 
Re: Data Grid Column Update ProblemYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Nov 06 7:59 AM
fiogf49gjkf0d
Hey there, Robert, can't you just refresh the datagrid on the exit event for the control?

Mark
[Reply][Quote]
Robert Levine
Posts: 132
 
Re: Data Grid Column Update ProblemYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Nov 06 11:10 AM
fiogf49gjkf0d
Unfortunately, No! Thanks for the reply, really. And I'll expand on my little tale of woo.

The grid in question is the grdProducts grid in the Opportunity.Products tab. But I was able to construct a workaround. The problem is that we put two new columns into the grid which employ drop downs for in-cell "node" editing. One of them is a date-picker calendar control. When the user selects a new date, the focus is still in the edited cell, and no "exit" event is fired. There are 2 possible exit events (the On Edited event and the On Change Node event). But if the user clicks on the ">" Next Opportunity button on the Record Nav. bar just above the Opportunity Detail view, the system moves to the next Opportunity record in the current group without envoking one of the exit events.

Yes, users should click out of the edited node, but it is rather easy for them to forget to do so in this situation. The first code in this tab to be invoked upon a record change is the "txtDataBoundChange" (yep, this is not your normal tab, its the result of legacy code, and doesn't follow the normal data grid-simple edit view standard established by SalesLogix). Anyway, at the beginning of the "txtDataBoundChange" sub, I now force a change in field focus from the edited data cell with a Msgbox call, and that fires my desired exit routine which will commit the data change to the database. Oh, yes, the affected data is still in the active data record set (grdProducts.Recordset). And that permits the proper record to be updated. All I can say is that changes to the Opportunity Products Tab and related code is very complex and should be approached with caution.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Data Grid Column Update ProblemYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Nov 06 5:14 PM
fiogf49gjkf0d
When > is clicked, OnValidate is fired. The record changes and then OnChange fires.

It may be possible to use OnValidate and force the grid to update. You could use booleanIsEditing to determine if the grid is in editing mode and only then call DataGrid.Refresh. You would set the boolean to true using the OnEditing event for that column only. You would want to set the boolean to false during the event that calls your column update code. This is done so that you only refresh the grid when a user enters this edge case, otherwise the refresh is an unwanted performance hit. Of course this would only work if the refresh somehow triggered an exit event, which I believe it does.

Another alternative might be to use the OnDateColumnValidateInput event to house your column update but if that isn't called immediately after the date popup then you're no better off than using the exit events. I believe OnDateColumnValidateInput was introduced in 6.2, so if you're on an earlier grid it won't work. OnFormatColumnText might be another option but I believe that was introduced in 6.2 as well.
[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/22/2024 11:11:13 PM