I have two drop down lists and one panel in my content page. The panel is not visible. What I want to achieve is when I choose the first item in the first drop down list, the second drop down list will change according to my first list's choice. I have done this part by storing the data into the database and retrieving the choices from the database.
Then, when I choose from the second drop down list, I wish to show the panel. I stored the panel name into database already. I can retrieve the panel name from the database, but I'm not sure how to proceed.
How can I get from that string (panel name) to the panel object and set Visible=true?
put the panel in other asp.net panel with id "pnlParent" or div with runat="server" then in your code behind try :
Panel pnl=(Panel)pnlParent.FindControl(your_dynamic_id);
Related
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.
I have something like this to enter staff details list. Above is the table list. User click button below the table to add new list record. Then fill in the list details on the form beneath it.
My question is how can I just allow user to enter/fill in the list details directly on the table itself. Not only that, also user able edit record whenever the user clicks the records and wanted to change them.
The example I am providing is specifically for a datasource in autosave mode, so you will need to make some adjustments since it appears that your datasource is in manualsave mode. First you will either want to recreate your table and in the table creator choose 'Editable' which will automatically place inputs in your table row vs labels. Alternatively you can just replace all your labels with Textboxes, Dropdowns, or whatever your input should be. See the image of the table creator below:
Since in my example I used a 'Insert Only' form I moved my 'Create Button' and my 'Clear Changes' button inside the formbody, then set the flow direction of the formbody to horizontal and then matched the spacing of the form fields to the same as my table row and dragged the formbody to be between the tableheader and the tablebody(list) element. See the image below:
Again you will want to make adjustments to fit your needs such as rearranging where your 'Save' and 'Reset' buttons appear and in manualsave mode you may be able to skip the formbody entirely since your 'Add Details' button should automatically create a new table row anyways which you will then be able to edit directly in the table, you may just need to find it first but generally new rows should just be added on the bottom of your current datasource page.
I am building a google app via the google app maker and have a drop down box with a list of values. What I want is a value to be displayed in a text box based on the value selected in the drop down.
So if you select "X" from the drop down "Y" appears in the textbox
If you select "A" in the drop down "B" appears in the textbox etc
I am very, very new to app maker - all my coding knowledge is in VBASIC.
There are different ways to achieve the desired result, but basically you need to start with setting both names and options for you dropdown:
Once you have that I would recommend to bind dropdown's value to something real, like datasource's filter (#datasources.Orders.query.filters.Type._equals) or to particular record's field (#datasource.item.SomeCoolField).
In case you are just learning App Maker and trying to do different things, you can bind both dropdown's and textbox's values to page's Custom Property.
I have a form that has a menu item which takes us to another form and per base AX filters on the selected record.
I want to create a separate menu item that takes me to the same form, but instead removes the filter on the record.
Any ideas?
Are you talking about Dynalinks, Opening a second form from the first, and only seeing the records in the second that relate to the currently selected record in the first.
If so Either remove the Datasource property from your new menu item on the first form, or programmaticly clear the dynalink in the second forms datasource's Init() method
Here is a simple example (from AX2009)
http://ckmun.wordpress.com/2009/07/08/cleardynalinks-method/
I have four different tables and I want the data from each table to be shown on four different tabs?
Create four subforms, each based on a different table. Place one subform on each tab's page. If your tables are related, you'll need to either base your main form that contains the tab control on a table or query that contains your key column.
While #Joey's answer is certainly the way to place different tables on different tabs, it can lead to a slow-loading form. In general, I prefer to have one subform control into which I can load different forms as required. The user does not see any difference, in that there is not much difference between clicking a button and clicking a tab.
Me.TheSubFormControlName.SourceObject = "frmForm1"
You can also set the link child and link master fields at runtime, if required.