I have a webgrid in partial view and rending the partial view in Index.cshtml through controller action.
Ajax call for "Select" link which is inside webgrid is working fine. But Paging and sorting is not working fine. whenever the link is clicked it goes to the default loading page and webgrid disappears.
Please help me how to implement sorting and paging for this.
Related
I'm starting a new universal windows app project. Normally I do web developer but have been asked to do a Universal Windows Application.
I'm starting to get somewhere now and have been using MVVM Light and have a couple of views set up.
Anyway here is my question, is there a way for me to have a "Layout" page, similar to what I would have it ASP.NET MVC?
For example, I have the main xaml page in my app, and the root control in that page is a SplitView. I have it so that when I click a button in the split view pane it takes me to the correct xaml view for that button. The thing is this page doesn't have the split view so I no longer have any navigation.
Surely I don't need to duplicate my menu across every view? I assume I'm missing something blindingly obvious.
Thanks,
The Splitview works this way that the page containing the split view will always be active (I normally call this page shell.xaml)
In here you can place your hamburger menu and add other things that should be visible all the time. Then you create a frame inside the splitview where your child pages live. handling navigation should only navigate using this frame and not the main page.
Here is a working sample that might explain this better:
https://code.msdn.microsoft.com/Sample-splitview-with-edcc2ca9
I think you need something like this.
You have to navigate your pages just to frame in SplitView content, not to default application's frame.
<SplitView>
<SplitView.Pane>
Your menu
</SplitView.Pane>
<SplitView.Content>
<Frame Name="ContentFrame" />
</SplitView.Content>
</SplitView>
And than in code-behind set the page you want like default
public MainPage()
{
this.InitializeComponent();
ContentFrame.Navigate(typeof(Homepage));
}
My controller returns a string which is a url of an image. How do I display that url on the view in asp.net mvc 4
I guess it's something very straight forward but I can't find out how to do it.
You're not providing a lot of detail but if you have the image url in the controller you should be able to set it to a model property and then in the view use something like:
<img src="#Html.Raw(model.ImageUrl)" alt="a description of the image">
to use that url to display the image. Yes?
The following is the structure of my Sencha Touch Application. I have a view and I have given xtype "homepage" to it. In the homepage view I have the following items.
A toolbar docked at the top.
A list in the left side of the application
On the Right Side, I have a view with some display whose id is "display"
Problem: Now I want that when I click different options in the list, different views should be displayed on the right side of the homepage.
I am able to call list-item-tap function in controller and I am able to identify different items of the list. Only problem is that I am not able to replace the given display with another view
Okay, after searching a bit on the net, I found the following solution. I should use layout:'card' to the container in which I need to be changing views. In my case it is a container with id display.
Then in Controller.js I should write the following code:
var item = Ext.ComponentQuery.query("#display")[0];
item.setActiveItem({xtype:'xtype_of_your_view'});
I have created very simple nav project with ListView. When I use ListLayout it doesn't display my data. Instead it displays loading bar. When I use GridLayout everything is ok. What's the problem?
I have written an MVC Sencha Touch app to query a database via JSON and then return the list in an Ext.List
The idea here is to have an iPhone-style UINavigationController effect that slides in for the results list.
To achieve this I use an Ext.Panel that loads 2 cards, one is my query (Ext.Form) the other is the results wrapper Ext.Panel (I use the wrapper to display a toolbar at the top since Ext.List is not capable of this)
I use the forms filter to trigger a 'search" method in the wrapper that then loads an instance of my Ext.List.
This all works quite well, except the results list fills the whole screen, and therefore sits "behind" the wrappers toolbar instead of below it.
The results don't even display at all unless the Ext.List has fullscreen:true.
Any suggestions most welcome.