vielen dank Ole!
Sure Tony, will be happy to. How can I do that?
Doesn't work in Chrome but here is a solution that works in Firefox, would this all really be necessary or is there a better way to do it?
Is it possible to show this forum's lists using the jqGrid by embedding html tags in each cell? Is this recommended?
When did support stop for 3.4?
Tony, is this issue resolved in version 3.7?
Here is the solution:
Domain Model properties (C#):
Thanks for the tip Tony. With this the value will show up in stead of the text in the grid, so for example some objection will show “300” whereas I want the user to see the text value. BTW, I am using version 3.4. Does this mean I must create 2 versions of the column, 1 for viewing that simply has the text value, and another hidden that contains the key value – “300” in this example – that will populate the from drop down correctly?
doubleforte, how much data are you trying to search through client-side; i.e. how many rows and how does the client-side search/filter affect performance of having to load all data? I'm just curious as I always hit the database for every request as a rule because it is hard to say how a list may grow in size over time and I'm not sure doing client-side filtering outweights the performance hit of loading all the data?
gseroul, you need to be careful with this grid, the value that you return and show in the grid's list needs to match the text value and not the option value.
For example I ahev a list of addresses listed and the first column is the type of address, work, home, etc:
BUT, the dropdown list looks like this:
Work
Mailing
Home
Other
Billing
I always thoght the value of the “Name” in colModel has to match the “key” or option value from the drop down list, but it is actually the text value it needs to match. Hope this helps. When the SAVE occurs it posts back the value (for WORK it will post back “1”). If you add a default first value to represent no specific option you can use
All
, and when there is no value in the “name” column for that property it will select the first one (“All”).
Tony, I think this should be determined by the server-side code. If we start adding too many options to jqGrid it is going to become too large and performance will become increasingly hard to tune from your end. I cannot see a situation where a user should decide whether or not a search option should be case sensitive or not, for example address, name, etc should always be case insensitive due to the nature of the Internet today, most folks texting today do not care about case. Anyway, doubleforte, not saying your request has no value but we need to always keep in mind we all use this GREAT plugin and want to keep it lean and mean 
Just as an example, the page with multiple grids on the page I have defined as such:
Thank you for atking the tmie to ellaborate Mike. For a moment there I thought I have fallen of the bus so to speak 🙂 Makes perfect sense.
Mike/Tony how would this work. Only the first page's data is returned, you don't want 10000 accounts passed over the network to the browser so you can only show 10 on a page, when you now do client side filtering, only the first 10 rows (as in this example 10 rows per page) will be filtered, you would loose the data that would have come up in the filter from page 2 and up? Am I not understanding you correctly Mike or what?
Just as a note, I have 5 grids on one page in a particluar instance with no issues. When you select a row on the first grid (onSelectRow) it calls the other 4 grids and loads their data. Each one of these grids suports editing and require lookup data (drop downs) in the form edit mode so I get the data within each grids declaration with the jQuery ajax call and am sure to use the
async: false
property, which ensures that each grid is loaded without overlapping sessions or threads.
On another note Darren, I keep the previous value of the number of rows per page on my server (Mvc app) and when it posts back for any reason I check to see if the number of rows per page has chnaged, and if so, send them back to page 1. However, I was using a sessions variable MyjqGridRowsPerPage and since I have many grids on the same page will need to create a different one for every grid, seems like a lot of work, how did you handle this situation with the user changing the number of rows per page? Tony do you have any suggestions?
Welcome to open-source ![]()
If you need some examples check out:
http://rensodevelopment.blogsp…..h-asp.html
http://rensodevelopment.blogsp…..-grid.html
Let me know by adding your comments in the blog if it helped and if you would like more examples.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top