I think, that you are looking for postext module from Paul Tiseo. It's documented in docs under user modules. Through this you can modify postdata, which are sent to server and add customized search query in there. I think, there is even demo for this.
Yes i know that, but it's really weird. In Firefox it show in left frame “Firefox can't find the file at http://www.secondpersonplural.ca/jqgriddocs/index2.htm.”. MSIE works normally. But Firefox at my home works, so i guess it's a glitch somewhere else.
A had already added own css class to the row by this way.Adding image would be same, you just need to find column, where it should be. Key is event afterInsertRow. There you have everything you need for this operation.
getDimensions() is function from Prototype library. If you don't have it, you still can use $(“tablew”).width(), it's the same.
Alright and what's purpose of this topic then ? 🙂
Interesting. Then i don't understand your problem 🙂 But i think that problem is in setting width in colModel. You should use function setGridWidth to set width to whole grid.
I think it's not possible. I was researching this few day ago (http://www.trirand.com/blog/?page_id=18/help/width-and-msie-issue). Grid is built from two separate tables and width of the columns is computed and set to these columns. If you just set 100% width, browser computes width of these columns based on content which is different…So it would be nice mess 🙂
I had short look at this, but i can't imagine how it can be useful for jqGrid. It seems to me like too robust solution for this case. Maybe i just don't understand it. Can you, Caspar, please give some example of using this in grid ?
Nevermind, i studied it deeper and now i get it 🙂
Well, this kinds of workarounds i really don't like. Giving a user longer time to wait than necessary. I was solving this way a lot of bugs in past, when i didn't understood problem, but it's essentially wrong ![]()
I was thinking about this and tried another approach. Whole think is wrapped to additional div which i hide (by display: none) on resize. Then IE then thinks, there is nothing and sets corrent width for container. Then i get it, set it and show back again. It seem a little bit cleaner, it's not even lagging, but there is visible resizing of this grid, because of that hiding and showing whole thing. Maybe on some faster computer it will not be so obvious. I tried also setting position of whole think to absolute and then back, but it's same result.
I don't know if there is better way. Initial display is not so much problem, it can be done in initialization time before table is transformed. You just get width of parent and if “width” option is set to 100% then set width of grid to that width of parent.
I would really appreciate if design of grid wasn't so scattered into two places (hardcoded and stylesheet). I'm speaking especially about fixed names for some images like down/up.gif.
Here is my case. In asp.net i have every image stored in binary resouces file, which is read by server on specific request that doesn't contain name of image but pointer into that resource file. So i cannot have simple img element with standard url path, but it must be replaced with something generated by server.
For no i made very dirty workaround, but i hope that in some future release it will be more extensible. Simple solution could be like for paging images through options for grid, which i can generate by server.
Well, you always have an option to write your own json writer, which will build json string with your rules. When you look at english online manual, in comments to function json_encode, there are already some nice looking replacements, which you can eventualy extend for your needs. This core function is for simple types only with no extensibility.
I was solving this problem just today in my asp.net application, it was really easy.
Well, i found a little dirty solution. If you know anything better, please let me know.
|
1 |
$(window).resize(function() {<br /> $grid.setGridWidth(10,false);<br /> $grid.setGridWidth( $grid.parent().parent().width(), true );<br />});<br />$(window).resize(); |
It simply resize grid width to 10px, so the container has right width and then grid is resized to that new width. It works fine, even resizing to 10px isn't visible, but it is “lagging” when i resize window. That's why i call it dirty ![]()
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top