Create Child View based on selection in Drop Down List - asp.net-mvc

I am using MVC 5 and I have the following situation:
I have a drop down list on a view that changes the child view that is displayed based on the selection in the list. This needs to change on the onchange or similar event. The selections in the list are populated from a database and has the following properties:
Link ID - Int (to be used as a value for the selection (must be saved on the main view)
Link Text - What is to be displayed in the drop down list.
LinK URL - The address of the child view action (made up of different areas, controllers, and actions)
In essence, when the list changes, it must call the URL (passing the model) and return the content to a targeted placeholder div on the page
Any Ideas on where to get started on this one?

We were able to get this working using ajax to call the child view. Thanks for the pointers.

Related

Problem creating form nothing shows up in layout view or form view but it does in design view

When creating additional forms I have created a series of text boxes in design view.
When I select form view or layout view it comes up blank.
When I look at the form property sheet allow layout view and allow form view are both set to yes.
Your form's record source is empty, i.e. it contains no records. The form has no records to show and thus appears empty.
And it's either set to not allow adding new records, or the record source is read-only.

Filter data from Umbraco backoffice listview

I've a page called Page where I'll add some blocks called a PageBlock. This two are both document types. Under the Page you could create Pageblocks and Pages. Inside my listview on the backoffice, I'll only show the Pages. In the content three, I'll only show the Pages.
How could I do that?
I've tried to find a filter but nothing found and I wouldn't write a plugin. I'm using Umbraco 7.6
Update: I know how to create an listview but how could I make a filter to show only the childeren of one document type?
I don't know if I understand the question correctly, but I think what you want to do is set the permission of Pages to allow Pageblocks as its children (On the permissions tab of Pages)
Now if you want to display the children of Pages as a listview go to List view (top right) of Pages and enable Yes - Enable list view
If you want to both be able to view children in the tree and in a listview, you can leave the above option unchecked and add a List View property to the Pages documenttype (as displayed in your screenshot)

How to reload parent view in Vaadin without table reseting sort order

I'm using PagedFilterTable in Vaadin to manage pagination. When loading default page, I have set something like this - and I include sorting by some field:
if(this.sortField != null){
table.setSortContainerPropertyId(this.sortField);
table.setColumnWidth(this.sortField, 80);
table.setSortAscending(true);
table.sort();
}
So that happens when the page is loaded and that is fine. After I submit new entry (entries are being added through new, popup window), table gets new row, but the table loses it's sort order in view after popup closes, so sorting is no longer keeped. Problem is I do not know how to get to that table element from that popup window and set sorting again. Why table is being updated and I see it, and sort doesen't? Problem is bigger because I have both windows in separate files and seems to me I can't grab table element easily without modifiying the logic because I am in another window.
How to reload table so that the sort stays same?
I managed to do this after submit:
getUI().getPage().reload();
With that it works, but I am not satisfied. After that line of code, everything reloads again (meaning all queries execute again). Result is good but I don't want after submit whole reloading of page happens (also because none of my other buttons do reload). So I would like only to reload table in parent window.
How can I grab table object from outside window and for example set it's change to immediate and correct change?
Something like this I suppose needs to be written:
getParent().getUI().setImmediate(true);
?
Or better question, how to manage to table sort remains the same after inserting new entry through new window?
I managed to solve it. On the parent window in the windowCloseListener I just added:
myTable.refreshTable(data);
myTable.sortTable(); // my custom method that was Invoked on the page load too

UI MVC Grid with custom command

I have a grid which displays a list of branches. I also have a ContactDetails button on each row which is a custom command popping a Kendo window displaying the details. It all works fine. However, I want these details to be editable. How should I approach this? I cannot seem to be able to access the model through the window.
I am using the code from their custom command demo: http://demos.telerik.com/aspnet-mvc/grid/custom-command
Ultimately, what I want is the grid to pass in the model representing the relevant row into the window so that the model can be modified and then persisted on the database.

View custom column

SHAREPOINT 2007
I've created a customer site column. When the user creates a webparts page the column must be populated.
What I want to do is have the value of this column automatically appear on the web page.
This should not be that hard.....
If you are using the out of the box input form, for them to fill in the data, the column will show up there automatically. If you are referring to a list view that is already on a page, you will need to edit the page, modify the webpart settings and customize the view (or simply pick an existing view that has the column added to it.)
When you put a list on a web part page, the list view format is psuedo copied to the page in that the page will not reflect and changes to the view that existed when it was put on the page, which is why you either have to reselect the default view or else customize the view of the webpart on the page.

Resources