Override uSendToXL Without Custom Instance List

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Override uSendToXL Without Custom Instance List

Post 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.
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: Override uSendToXL Without Custom Instance List

Post 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.
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Override uSendToXL Without Custom Instance List

Post by caseywhite »

Hi Mark thanks for the great tip. This works.
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Override uSendToXL Without Custom Instance List

Post 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?
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: Override uSendToXL Without Custom Instance List

Post 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.
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Override uSendToXL Without Custom Instance List

Post by caseywhite »

Thanks for the feedback Mark.
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Override uSendToXL Without Custom Instance List

Post 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
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: Override uSendToXL Without Custom Instance List

Post 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.
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Override uSendToXL Without Custom Instance List

Post by caseywhite »

Ah! Right. Thanks for reminding me about that.
Post Reply