Can I add 2 different button classes' in a trigger under the main tag and get proper data in my GA? - triggers

In a pricing page, there is a "Buy" button when user clicks on the button, it takes to a page where the user chooses payment type and again there is a button with another class, I want to track both of them. Is it possible to set up 2 button classes(in one trigger) under the button click tag and get proper data in GA?

You can achieve this, but not in this way, as visible on your screenshot. These conditions have AND relation. So your current trigger requires a click on an element with a class containing payment-button price-btn AND btn-pay at the same time.
So you need to create two separate triggers for the two class variants, and attach both of them to the same tag as firing triggers, as those will have OR condition among themselves.
Please note, that payment-button price-btn will look for this string. So if there's any chance, that the classes don't appear in this exact order, you might want to go for just one of them, or separate these two classes in two rows of one trigger, payment-button and price-btn.

Related

How can I change the order of ToolButtons in a inheritable form?

I have two forms. The first one has a TToolBar and two TToolButton. The second one inherits the first one and has three more TToolButton.
I change the order of the buttons in design time, putting the three buttons of the second form before the buttons of the first form. When the application is running, the buttons of the second form appear after the buttons of the first form.
Is there a way to use the order set in design time?
No, there is no way to override the position of buttons inherited from the ancestor form. Buttons on a TToolBar are contained in a simple TList and are added in the order that they are created. They are created in the order that they appear in the .dfm file and, when inheriting a form, the ancestor's controls are always created and added first.
Even if you reorder the buttons at design time, save the form, and then close and re-open it the layout will only preserve the ordering changes to the descendent form's toolbar buttons with the ancestor buttons reappearing at the beginning again.
This is a limitation of the TToolBar class itself. Your options are to either write a custom toolbar or to manage the button arrangement programmatically.

MS Access Form Development: Hide Objects when an Option Button is Pressed without coding for each Object that needs to be hidden

MS Access Development Question:
I have 3 options and I need each one associated with a different set of objects. Therefore, if you click option 1, a set of objects will appear in a box I'm referring to as "Report Parameters". If I click option 2, the objects in the "Report Parameters" box will disappear and a new set of objects will appear.
I didn't want to write code to switch each object from visible = true to visible = false. I thought that would take too long, especially if the number of option buttons or the objects related to it grow.
So I'm trying several things...
I tried putting all objects, that relate to a particular option, in a Subform. Therefore, I would have three subforms and that would sit in the same position on my main form. When you click on an option, the subform for that option is made visible any anything else is hidden. But I have a background picture that needs to be visible on the main form and you can't make the subform background transparent.
I used Tab Controls; however, I didn't want to use the tabs to control the switch between objects. I can hide the tabs but you can still switch between them if you click the space where the tab should be. It can be made transparent though so that helps a lot.
I need something in-between a Subform and Tab Control but I've hit a dead end. Does anyone have any other suggestions or recommendations? Or am I stuck coding for each object?
I'm an experienced VBA developer. My last option was to run a query against the form and pull all object names and save it to a table. Since the syntax of the name for each object connects it to a button, I can always run a loop that makes all objects visible/invisible if the object's name corresponds with a specific option... but... I guess I'm trying to find a shortcut. Let me know what you think! Thanks.
I was able to resolve my issue. I just needed to do some thinking... so writing up this question was a bit premature. I'll write down what I did in the event that someone has the same issue I have.
First, I used the Tab Control object to resolve my issue. I made the control transparent and named each page to reflect the Option Button I was selecting.
I then mapped each option to a button in the VBA code of the button. Therefore, when the button is selected it does several things.
First, it makes the default value of any of the other options equal to false. I also set the visibility of their corresponding pages to false.
Second, I select the page I need visible and set the visibility to true. I also make it my active page.
Lastly, as a safety measure, if the option button is already selected, and you select it again, by setting the value of that option to true. This is to prevent it from changing to false. One option should always be selected.
Hope that all made sense!

Display Additional Form on Update - RadGrid

I'm using a RadGrid for changing record status's. Users have the ability to select a status from a dropdown and update that record with that status. Depending on the status chosen, when the user clicks update I want to popup an additional form so the user can fill out more data required for the update. I'm not sure the best way to go about implementing this. Any suggestions are appreciated.
One way is to use the RadWindow like a modal and pop it up to the user via client-side JavaScript. We use RadWindows in our applications and it works. Or, the RadWindow supports a Nested Grid or View that you can have as a record's child; so you can have the master record, click on the arrow on the left and expand the record to view a nested grid of data, or a custom view (via the NestedViewTemplate property). You can also have the form in a DIV, hide it, then show it via JavaScript too.
Those are two ways.
HTH.

Editing Records with MVVM/MVVM-Light

I have created a very simple wpf app with mvvm light.
I have rows in a list view, these are templated representations of Book objects.
I can click a row, then click an edit button, this button loads a new window and sends the new window the book to edit (using mvvm-light's Messenger).
The issue I have is when I edit the record in my new window the data on the main form is updated. The text boxes are bound to the object received via the Messenger.
I know this is because I have essentially passed a reference to the same Book object around the place, therefore I update in one place.. and voilĂ  it updates on the main page too.
What I would like to know is.. is there a standard way/method/concept to achieve what I am trying to do? i.e. create an "edit" page/screen with the option of discarding the edits?
thanks.
Could you make your entity implement ICloneable and create a clone for editing?

Choose correct UIButton on dynamiclly created buttons without tags

I am loading up a plist file and creating buttons based on this file. These buttons can change at any point during the application running (which will trigger an update of all the buttons etc).
One set of buttons represents a list of categories. So I may have a house button, car button, etc. No matter what button is pressed it will call my categoryButtonPressed:(id) sender function. I need to know what button called it and load a second set of data based on the button (category) that was pressed.
So if I press the house button, the function needs to load the house data, but how can I determine what button was pressed in that function. If I use tags I have to know that the house button is tag 1, car is tag 2 and so forth. BUT I don't know if there will even be a house button until I read that file. Do I need to code the tag into the plist file as well?
OR is there a way to loop through my Array of UIButtons and determine this? Any advice?
And last, if I create my own extended version of UIButton that added a "name" variable, would I would still be out of luck because the action would pass the UIButton base and comparing my extended class to the base would always fail correct?
Thanks for any and all help!
And last, if I create my own extended
version of UIButton that added a
"name" variable, would I would still
be out of luck because the action
would pass the UIButton base and
comparing my extended class to the
base would always fail correct?
The action is passed by whatever control, of whatever class, the action was registered with. Creating your own custom button with additional properties seems like the way to go.
You could also set the tag of the button as the index in your button array, or the index in the plist that the button corresponds to.