How to get the page model along with grid transactions (iggrid) to server in ASP.NETMVC - asp.net-mvc-4

I am working on ASP.NETMVC and iggrid (Infragistics). Is there any way I can pass the page model along with grid transactions to server (controller from view)?
Thanks in advance.

Related

dgrid's OnDemandGrid keeps sending requests to the server

I have an OnDemandGrid setup to display product data (called parts) for a project i am working on. I currently have only two entries in the product database.
My OnDemandGrid is setup with only the basic options: store, and columns. I am hoping it will be a virtual scrolling grid. the store was setup as a JsonRest store, with Cache
what happens when i open up the page and startup the grid is, the grid keeps sending requests to the server for data continuously - approximately 2 requests per second.
I also realize that for a grid with only two rows, it has a scrollbar on the right. when i try to use this scrollbar to scroll, I find that the grid seems to flicker and reset itself. many times.
I suspect the virtual scroll feature is doing something funky, somehow not acknowledging that there are only two entries. can some one help me out in this? am willing to provide more details should that be necessary.
Here is my code by the way:
require(["dgrid/OnDemandGrid", "dojo/store/Memory", "dojo/store/Cache"], function(OnDemandGrid, Memory, Cache){
var partsCache = new Memory();
App.Store.parts = new Cache(partsMaster, partsCache);
var grid = new OnDemandGrid({
store: App.Store.parts,
columns: {
name:'Part Name',
part_no:'Part Number'
},
}, "grid");
grid.startup();
})
partsMaster is a JsonRest store defined earlier (global at the moment - taking the grid for a spin) in the code. I've done some tests to safely determine that JsonRest is not the issue.
here is a screenshot of the grid currently (note the existence of the scrollbar):
Any help is appreciated!
EDIT: attached is a screen shot of the first request response header from chrome:
Based on the screenshot it looks like your response is not including the Content-Range header, which is what dojo/store/JsonRest uses to inform itself of the total number of results in the set. While I'm not sure that alone will cause your infinite-querying problem, it will definitely cause a problem.
The Content-Range header should look like e.g. Content-Range: items 0-24/500 (assuming 500 was the total number of items in the result set).
See http://dojotoolkit.org/reference-guide/1.9/quickstart/rest.html for more information on how JsonRest expects services to behave.
If this doesn't completely solve the problem, I'd also be curious to verify that the response body is indeed yielding the correct subset of results.
Edit: based on interaction I had on a dgrid issue today, the issue could be that your service is actually returning the incorrect number of results based on the query. See these comments on #691.

partial view in mvc4

I am new to Jquery mobile and asp.net mvc4. In my application I have divided my page into three blocks(ui-block-a,ui-block-b,ui-block-c).These three blocks are in shared folder(_Layout.cshtml). Left side and right side blocks are partially viewed. In the middle block is normally viewed. When I perform any modification the partial view is also refershing.I want to load my partial view on my first time loading only. If I do any change on middle block the partial views should not be affected. please help how can
I do this?
Partial view doesn't mean it would be partially updated. It's just a small chunk of ui code wich is suitable to be grouped into a separated file for reuse.
you'll need to implement ajax functions into middle block when updating.
jQuery.ajax
would be the api you can refer to.

BOM structure inside manufacturing order.(tree view inside a model) openerp

I need to add a new page inside manufacture order which shows the tree view of bom of the main product.Something like the image below
Does anyone have idea about it?I need it in 6.0.3
If you are using new web client i.e. 6.1+ this feature you are asking that "add a new page inside manufacture order which shows the tree view of bom" Does not works,
Pure Solution is use GTK client or Go Implement the missing feature in web client.
or What you can do is yo can provide some Right hand side short cut act windows which will open the new view which is expected by you.
and IF I am not missing anything then this matches with your older post : how to group one2many list view inside another model in openerp 6.1? ;)
Thank You

How to display different data from the same table in Repeater that exists in many pages of the website?

I have a Repeater that shows safety messages from the Safety Messages Table in the database. Since I will put this Repeater in many pages of the Website, I want to this Repeater to show different messages in each page. For example, if it shows message#1 in this page as a first message then message#2 and so on, it should show message#10 as a first message in the other web page and so on. So how to do that?
My query is very simple like this:
SELECT MessageID, MessageDesc, MessageAuthor FROM [SafetyMessage]
Is this issue related to the query? Or it can be done from the Repeater itself?
UPDATE:
I want the repeater to show the data from the database in each page in different order
What you want is called "paging support". Here is an article with an example of how to do it.
Edit: Based on further information from OP...
It sounds to me like what OP is asking for is paging and sorting.
This article explains how to do paging and sorting with a repeater control.

How to show search results no same

I am new to Django, and want to do the following
I have a form that takes two inputs, processes and forwards the results to another page.
I want to display the results in the same page with form page included.
How can I do that in Django?
Thank you
Save the data in the session after the POST, and pull it out of the session on the other page.