Page 1 of 1
Override uSendToXL Without Custom Instance List
Posted: Fri Aug 24, 2018 5:37 am
by caseywhite
I know you can override the uSendToXL method as long as you have a custom instance list. If I wanted to create my own true Excel file with logic that will put more than just what is visible in the list, is there a way to override the Send to Excel button without having to create a custom instance list. For example can a method/event be exposed that can be trapped in a filter to know that the button was clicked so that you can override how the download should be done.
Re: Override uSendToXL Without Custom Instance List
Posted: Fri Aug 24, 2018 10:37 am
by MarkDale
You probably can't.
But as an experiment you could try creating a snap in instance list that extends VF_UM040O, and specifying a uSendToXL override method in that.
Re: Override uSendToXL Without Custom Instance List
Posted: Thu Nov 08, 2018 3:13 am
by caseywhite
Hi Mark thanks for the great tip. This works.
Re: Override uSendToXL Without Custom Instance List
Posted: Sat Nov 10, 2018 10:52 am
by caseywhite
Mark, I was experimenting with how I could figure out which column I am in on a mouseover event of the list. It seems like even if I make a collection of the columns and handle the event #uColumns<>.ColumnMouseEnter this only fires for the column header. But on a regular grid I can create the ColumnMouseEnter event which will fire for any row of the list for that column. Is something overriding this logic in the framework instance list? My collection is of #PRIM_LIST.Column so I was surprised when it didn't work. Any ideas?
Re: Override uSendToXL Without Custom Instance List
Posted: Wed Nov 14, 2018 4:08 pm
by MarkDale
There isn't any specific override of the Column<>.ColumnMouseEnter event in VF_UM040O.
The list in VF_UM040O is currently defined like this:
Define_Com Class(#Prim_list) Name(#MyList) Parent(#COM_OWNER) Displayposition(1) Tabposition(1) Height(312) Width(534) Left(0) Top(0) Columnlines(False) Rowlines(False) Selectionstyle(All) Columndrag(True) Columnheadersizing(ContentHeight)
I think that what you are trying to achieve should probably be done in your own instance list - not by overriding of VF_UM040O.
Re: Override uSendToXL Without Custom Instance List
Posted: Thu Nov 15, 2018 3:13 am
by caseywhite
Thanks for the feedback Mark.
Re: Override uSendToXL Without Custom Instance List
Posted: Fri Nov 16, 2018 10:20 am
by caseywhite
If I wanted to know which fields in the instance list are currently hidden which would mean I don't want to include them in the Excel download is there a way to do this. This code doesn't work in that #Column.Visible is TRUE even if the column isn't visible. I know there is a method to set the column visibility but it would be nice to have a method to get the column visibility as well.
For Each(#Column) In(#MyList.Columns)
#SYS_WEB.Alert Caption(#Column.ColumnCaption + '_' + #Column.Visible + '_' + #Column.CellWidth.AsString)
Endfor
Re: Override uSendToXL Without Custom Instance List
Posted: Mon Nov 19, 2018 9:32 am
by MarkDale
I think the property you are looking for is the #Column.ColumnVisible property, rather than the #Column.Visible property.
This has confused me in the past, too.
Re: Override uSendToXL Without Custom Instance List
Posted: Tue Nov 20, 2018 2:54 am
by caseywhite
Ah! Right. Thanks for reminding me about that.