Display old inactive data in dropdown - asp.net

I have a dropdown which displays some programs (active and inactive). I have a column (isActive) in the programs table in the database which either has a value N or Y.
Now I want to filter the dropdown to display only active programs. So, I will just do a sql select to get all programs which are active. Everything is fine up to here.
Now if a user tries to access his record and the program which this user selected (sometime earlier) is no longer active now, the dropdown will now show the first value.
What is a possible solution for this issue? How can I only show active programs in the dropdown without messing up with users record?

Make your first option in the select be a blank value. That way it will default blank if no value is present in the dropdown to select. Then, just validate your form so you don't get a blank value.

Related

Trying to display the export value of a dropdown menu selection in Adobe PDF

Let me start off by saying I have very limited knowledge of Javascript.
I've got a Dropdown menu called: CustomerType with 6 values in it.
Basically I just want whatever is selected in the dropdown to display again in another part of the PDF.
Can anyone help?
First set the properties on the dropdown to commit the value immediately. See image.
Then on the "calculate" script for the other field, enter the JavaScript below. You'll need to change the field names to your actual field names.
this.getField("myOtherField").value = this.getField("myDropdown").value;
You'll want to set the other field to read-only as well since the value is calculated.

Removing focus from first record in table widget?

I have a page with the table widget. One the page is open, first record in the table is in focus and highlighted. Is is possible to remove focus from the first record? I would like users to search for records before anything (from the table widget) is highlighted.
You cannot remove the default behavior of selecting the first row of the table when it gets loaded; However, if you pretend to only show data after the user starts searching for information, then you might as well not load any data. For that, you will need to uncheck the "Automatically load data" option form the datasource. See picture below:
Then, what you want to do is load data after the user searches for something.

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

Can we copy the value of one field to another in a repeating table of infopath form?

Hi guys can anyone tell me how to copy a field value in a repeating table to another field when we insert another row. It is just like amazon checkout process. In Amazon checkout process we have to click a check box when our billing address is same as our shipping address.
In this scenario am having one text box and drop down box fields in a repeating table. When am writing something in the text box and inserting another row. here come the problem I have inserted a value in the drop down box, when the value is selected in the drop down box the textbox value from the parent should be copied to the child node. This has to be done without any code behind.
Please help me regarding this issue
You could probably do this using the default value of the child node.
The default value can reference another field either on your main datasource or any secondary datasource.
I would assume that you don't want this updating when the user adds another child node. If that is the case then you will need to uncheck the "Update this value when the value of the foumlua is recalculated."

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