How to create Dynamic Control in Dynamic form Module in DNN? - dotnetnuke-5

Actually I have a DropDownList, Which have values 1,2,3,4,5,6.And Under this some controls 2 RadioButtons,3 CheckBox Group and 4 TextBoxes. When i select value 1 from DropDown These controls display once,when i select value 2 from dropDown , these controls display twice and so on. So how can i do this? Please help anyone . Thanks in Advance.

you can do that with jquery, somthing like this:
jQuery('<div/>').appentTo('#body')

you can achive this in two (or more) way:
add 6 "multiview" controls each of it has an empty view in it and filled view with the desired controls.
If you switch your dropdownlist you can call:
mvMymultiView1.SetActiveView(vShowControls);
mvMymultiView1.SetActiveView(vEmptyView);`
you can place 6 Controls of <asp:placeholder> on your page and fill them dynamically with new Controls at runtime.
I would prefer my first way to achive your target. This is pretty easy cause you can show or hide your controls rly easy and fast without deleting or creating any control at runtime.

Related

How can I add a custom column menu tab in ag-grid?

Is there a way to add a custom column menu tab with my own favourite icon which on click would render my custom react component?
something like
myColDef.menuTabs: ['generalMenuTab', 'filterMenuTab', 'myCustomMenuTab']
FYI I'm using v12.0.2
What you're after can't be done I'm afraid. The grid supports React components in all sorts of ways (renderers, editors, filters etc), but not via the column menu.
I've updated the docs page to remove the gibberish issue - it'll be fixed properly in the next release, thanks for highlighting this.
This would be helpful to have. In particular for us, we'd like to filter based off row properties, and not row values. Creating our own tab to filter by cell colors that we have assigned with our own set of labels would be useful.
I agree that it would be a nice feature to have. Apparently, there's no quick out-of-the-box solution to do it. The only workaround I see is to implement your own custom Header component which would display any buttons your want.
There you can put a button to open your own custom menu, which you can implement as any regular UI component. It also means you'll need to manually implement all standard menu options that Ag-Grid provides out of the box if you need them.

show and hide tabs dynamically in touch ui -AEM

I have a requirement, where I need to show few tabs on selection of a value from a drop down.
I have done this in classic UI. But not sure how to proceed for Touch UI. I know that we can use JQuery, Can anyone let me know the approach I can use.
Its fairly simple, look at the OOTB List Component /libs/foundation/components/list. The selection dropdown is defined - /libs/foundation/components/list/cq:dialog/content/items/column/items/listFrom, look at property class and cq-dialog-dropdown-showhide-target these are used to manage hide and show.
Now from here look at the dropdown values under - /libs/foundation/components/list/cq:dialog/content/items/column/items/listFrom/items these values trigger the hide and show mapping to property showhidetargetvalue as in /libs/foundation/components/list/cq:dialog/content/items/column/items/setDescendants

Should I make separate UIViewController just because a single row is different in layout

I am a very basic SWIFT Xcode programmer. I make small apps.
For last 2 days, I am stuck at a very simple thing and I am sure with your guidance I can quickly make a decision.
I have a UIViewController class as well as an xib
In the layout I have 4 textfields
Now based on a user setting (in another frame user make a choice), I will either have to show 4 textfields ** OR ** 3 textfields and a UISwitch.
Long story short, if user select one option he should see UISwitch and 3 textfields or else 4 textfield. The labels's text also change.
To my limited knowledge, I will make another UIViewController, another XIB file and if user selection allows I will segue to the new UIViewController.
But all this looks so redundant. How do you smart people do this thing?
(Edit)
I use size classes in my layout as well as constraints in the visual editor for positioning of elements on the layout. If I change things programmatically, which is one option, how will I manage the layout ?
Please advise.
Show me the right path please.
When user select first option based on action show or hide the text field or switches, like when user select first option only show three text field and one UIswitch hide fourth text field.
And programatically change text field hint value and also set NSString Tag="first" so that when you want that value at the time of submit button you can apply if condition to tag and on that basis you can get your desired output on each selection.

Add/remove usercontrol in panorama item using MVVM - Windows Phone

I have a panorama app that has two panorama items so far, "recent" and "popular." These get populated with data using binding from a viewmodel. I would like to add a third ("search") panorama item that initially shows just a text box and a button.
When the user inputs text and clicks on the button, I want the text box and button to be replaced with the ListBox control that shows the search results.
I cannot find any examples on how to do this using the MVVM pattern. I am not using a MVVM framework and would like not to since I am just learning all this.
If you can explain or better, point me to examples that will allow me to do this, I would very much appreciate the help. If I left out any required info in my request, please let me know.
Sincerely,
Kamal
Typically for something like this you would have a property in your ViewModel that would tell the view what to show. You have lots of different options for how you could do this.
One option would be to have a Results property that your list box is bound to. Put the textbox and button in a Grid and bind the Visibility property of the grid to a property that is Visible is there are no results and not visible if there are.
Lots of different ways to do this.
Examples here and here.
You could probably bind a list of a custom class to the panorama ite .
The custom class contains a title and/or description and a page class.
You can maintain your views in your main viewmodel.
Another solution would be adding the items in xaml and using the same viewmodel for the whole panorama item control. With a property you can control the visibility of each item.
Like Bryant said: there are so many solutions. It depends on your application and requirements... :)

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.