Handeling selections in selection enabled grids (GeneXus) - grid

I have a grid with selection enabled. Properties:
- Show Selector: Always
- Selection Type: Keep Selection while executing
The "for each selected line" instruction saves the selected items in a database.
Q1:
Is it possible to automatically select these items next time the panel is opened? how?
Q2:
Is there any way for me to know if/when there are selected items (so I could show / hide the "accept selection" button)?
I can see a "Selection Flag" and "Selection Flag Field Specifier" properties but don't know if they can be useful for any of these questions.
Thanks!

Q1:
Yes.
You have to add a new variable or att or member of the SDT of the grid that will behave as the flag of the selection. This element would be boolean. If this flag is true then that means that item would be selected, false unselected. You have to load this value on your Data Provider or Load event. Remember to hide this element on the UI because you don't want it to be shown.
Then on the Grid properties you set this element as Selection Flag if it is a variable or attribute, or you put the item of the SDT that behaves as the flag in "Selection Flag Field Specifier".
Q2: I didn't find a way to do this

Related

Using bindings with BrazosUI buttons

I'm used to using boolean bindings with IBM buttons to track if a button is clicked. The button in Brazos UI can be bound to any variable type but doesn't make automatic updates to booleans. How do I use bindings with Brazos UI buttons to track which was last-clicked?
The binding of a button is really only useful in tables. The acceptance of ANY variable type for the binding of a button stems from the use of determining the index of a selected row or obtaining the entire row object:
If you bind and integer to the button in a table, the binding will update with the index of the row when the button is clicked.
If you bind a variable of the same (singular) type as the table's binding, then clicking the button will update the binding with that row's data.
Both of those are handy interactions with the table control but don't work for tracking which button is clicked when used elsewhere on a coach. For that, you want to utilize the 'Button Control ID' configuration option. The most direct method is to bind the same string variable to all of the buttons you need to track. When clicked, a button will update that shared variable to match its own control ID. You can then use that unique ID in various scripting checks to take button-specific actions.
See the BP3 Help Center article for greater detail about this, including some examples: https://support.bp-3.com/hc/en-us/articles/217985767-Using-Button-Binding-with-Brazos-UI

Access 2010 : Allow combox box search, but lock for edit

I'm just reacquainting myself with Access after a long absence and am getting hung up on some relatively minor things !!
I have a form designed so users can select a ReportID from a combo box and the other fields in the form populates the information. That works great, however I don't want users to be able to update the fields, it's for reference only.
If I lock the form for editing then the combo box select doesn't work - is there a way that I can have a combo box control a form, but not allow editing or updating of any other returned fields ?
Set the fields Locked property to Yes.
You have to change two properties of Combo Box under Data tab Under properties. Following are the properties to be changed:
"Limit To List" the default value for "Limit To List" is "No" change this to "Yes"
"Allow Value List Edits" the default value for "Allow Value List Edits" is "Yes" change this to "No"
After doing this modifications on the default values the user will be allowed to modify the text in the Combo Box, but when the user is leaving the Combo Box the BeforeUpdate event will be fired and the user will get an exclamation message from MS Access.
See the below given pictures for more clarity. The first picture shows the default values, second picture shows changed values and the third picture shows the message if values are edited.
Default Value [1]
![1]: https://i.stack.imgur.com/RxUUa.png
Change To [2]
![2]: https://i.stack.imgur.com/rLnSM.png
Message from MS Access [3]
![1]: https://i.stack.imgur.com/kbPmc.png
**
Kindly reply to this message if this solves your problem.
**
Make sure your combobox is unbound (not linked to a field by its ControlSource property)
position it in the form header (not the Detail section)
set the form's Filter property to the combobox using the expression builder (button with '...')
also set the form's FilterOn property to true
http://msdn.microsoft.com/en-us/library/office/ff194672%28v=office.14%29.aspx

RadGrid Filter is showing error

In RadGrid filter , i am using
CurrentFilterFunction="Contains",AutoPostBackOnFilter="true"
Every thing is fine , But one issue I've noticed is that if the user types in the the filter text box and then clicks on the menu to select another option, the default filter is immediately applied, and what i have chosen option from menu that is not opening.
And also i don't want use "FilterDelay" because it is filtering automatically after time interval.
Here i want, When Press on Enter or Tab Buttons filter should work and when user type some text in filter textbox next click on any option from menu that will open.
Can any one give solution?
Thanks..
Well, basically with RadGrid and filtering you can't have it both ways. If you define both CurrentFilterFunction and set AutoPostBackOnFilter to true. You can't expect the filtering menu to work the way you want to. That is because AutoPostBackOnFilter will rebind the grid when the filter textbox loses focus (if the value has changed), so if you change the value of the filter textbox and then you want to select a different filter function(using the filtering menu) the grid will refresh before you get to select an item from the filtering menu. What you can do is...
Keep the CurrentFilterFunction, set the AutoPostBackOnFilter to true and then set ShowFilterIcon to false so that users can NOT select a different filtering function, or...
Keep the CurrentFilterFunction, set the AutoPostBackOnFilter to false and then set ShowFilterIcon to true so that users are able to select a different filtering function but notice that you will be dropping a functionality here as well...users will have to MANUALLY select a filtering function in order to filter the grid rather than pressing ENTER
As mentioned, you can't enable both AutoPostBackOnFilter and the filter icon at the same time otherwise you will get exactly these unexpected results

jsf table edit : retaining original values in bean in case reset button is pressed for row

I have a data bean collection bind with my tomhawk table.
Now lets say i want to edit a row, so i make all the fields in that row editable and change values inside them, but on second thought i press "cancel edit" button.
To make all the fields editable, i have a flag in the bean bind with field's "readonly" property. So when i press "reset" button, i set that flag to false.
Now problem is if i change values in field and then press "reset" button, values are updated in binding bean and original values are gone. Also i can query database only i case of modification.
SO how to retain original values in the bean here.
I am using JSF 1.2 and tomahawk components.
Add immediate="true" to the command button. This way all input elements which are not set with immediate="true" will be skipped.
See also
Debug JSF lifecycle - Explains among others the use of immediate attribute.

ASP.Net Cannot tab through all radio buttons when selected

I'm trying to implement accessibility (keyboard only) ability on my site, but I'm having problems with Radio Button lists. When using radiobuttonlists, when initially, none of the radio buttons is selected, I am able to tab through every single value and select one upon hitting "enter". However, after a value is selected, I can only tab to the selected values, which presents a problem if I want to change the selected value.
From what I understand, radio buttons are grouped at the container controller level, thus when it is considered a group, only one can be selected at a time.
Any ideas on how to fix this issue?
Actually, this is not an issue at all. If a value is not selected, the browser will go through each value within the group. Once a value is selected, the browser will only jump to the chosen value within that group. Thus to change values within the group, the user is to use the keyboard arrows.
I believe you're correct about the RadioButtonList being one control (and therefore tabbing doesn't work). An alternative could be to create individual radio buttons and use the GroupName property to assign them all into one group. This should let you tab between them and still ensure they work in sync with each other.

Resources