Mark

Forum Replies Created

Viewing 15 replies - 46 through 60 (of 104 total)
  • Author
    Replies
  • in reply to: Implement grid event and call default event behavior? #90689
    Mark
    Participant

    Or, simpler and more efficient:

    beforeSelectRow:

    in reply to: tableToGrid & selCol with input fields #90633
    Mark
    Participant

    I think its a deliberate feature… usually, you want clicks on inputs, selects and links to be handled by the object clicked on, and not by the grid, and thats what the click handler does.

    There is a workaround, which is to supply your own beforeSelectRow handler, and do whatever you want there:

    function myBeforeSelectRow(sid, e) {

    in reply to: True Scrolling Bug IE7 and IE8 #90630
    Mark
    Participant

    Hi Tony,

    Thanks. Im going to be away for the w/e so wont be able to look at it until Monday.

    One more thought… Math.round may be the answer after all.

    The current formula is supposed to take a pixel value, and return the page that contains that pixel. For that, Math.round would be wrong (if you were in the lower half of the page, it would give the /next/ page).

    But in this case, if all the calculations are correct, the pixel should always be the /first/ pixel on the page. But Im guessing (from Kaleb's investigation) that something isnt quite adding up, and we're getting an off by 1 (or perhaps off by border, or margin, or padding width, or some such) error. So Math.round ought to give the correct result.

    Somehow doesnt feel right, because its just hiding the fact that the calculation isnt quite correct… but I think it /should/ work, as long as the error is less than half a page :-\

    For the cells with images case… if the rows aren't all exactly the same height (?), the scrolling rows feature just isnt going to work as it stands (it depends on being able to translate back and forth between pixel offsets and row numbers /without/ having looked at all the preceding rows). I think it may be possible to fix that, but would require changing the scrolling logic somewhat…

    Mark

    in reply to: Column Chooser Complete Callback #90614
    Mark
    Participant

    Good point, there should be one.

    But for now you can just replace the done function in the columnChooser options:

    { done: function(perm) { if (perm) { $(“#mygrid”).jqGrid(“remapColumns”, perm, true); /* and whatever else you want */}}}

    Mark

    in reply to: Fails when certain URLs used for data #90612
    Mark
    Participant

    It's still odd that visiting the page /advertisers loads correctly, just not the AJAX (JSON) request to the same URL. Interesting.

    A couple of possibilities…

    I /think/ you said that it /did/ get blocked, if you just put “/advert…” in the browser's address bar, but not when you used the fully qualified url. So perhaps that particular pattern only matches domain-less paths.

    Another possibility is that since its basically trying to block ads on the pages you visit, it may only block xhr and iframe (and perhaps popup) requests.

    But this has made me realize that I need to choose my server-side filenames and paths very carefully – the adblock blacklist that I found had a /huge/ list of things it would block. I should probably install it just to make sure Im not violating any of them…

    Mark

    in reply to: True Scrolling Bug IE7 and IE8 #90608
    Mark
    Participant

    Sorry, but I cant actually reproduce the problem.

    I've tried single clicking the scroll arrow all the way down to row 100, and Ive tried paging down until Im close, and /then/ single clicking… what exactly do you mean by scrolling “slowly” down to row 100?

    Mark

    in reply to: True Scrolling Bug IE7 and IE8 #90575
    Mark
    Participant

    I'll take a look at this… but unless IE is reporting the positions incorrectly, Math.round is the wrong function. It /has/ to truncate to get the correct result.

    Mark

    in reply to: Fails when certain URLs used for data #90570
    Mark
    Participant

    markeric said:

    Ok. I believe I have a nice reproducible test for demonstrating this. I've tested this running in a Ruby on Rails WEBrick server on Windows and now in Ubuntu Apache (using PHP) and the same problem occurs.

    Here is what I did…

    1. Downloaded the “Demo Files (3.6)”. Actually contains 3.5, more on that in a sec (http://www.trirand.com/blog/?page_id=6)
    2. Downloaded the latest 3.6 jqGrid source.
    3. Updated the demo files to have the latest source.
    4. Setup the demo files in my Ubuntu machine in the apache folders, setup the database, verified working.
    5. Copied “server.php” to create “advertisers.php” and “adver.php”. All the internal contents are unchanged.
    6. Modified jsonex.js to change the URL that it fetches the data from.
    7. Ran jqgrid.html in a Firefox browser. Using Firebug to watch Net requests too.
    8. Selected “Loading Data” > JSON Data

    What I found is that when the grid is pulling data from server.php and adver.php it works correctly. This shows that the adver.php file copy change works too. But when I request from advertisers.php the grid freezes and the request for the page doesn't show up in the Firebug > Net tab. The grid appears to never finish initializing as there is no “reload” or search icons in the bottom left corner.

    I can zip it all up and email it to someone if needed.

    Thanks,

    -Mark E.


    I'm betting you have Adblock (or Adblock Pro) installed…

    in reply to: Fails when certain URLs used for data #90562
    Mark
    Participant

    Using Fiddler (on Windows) I can verify that the AJAX request is never made so it can't be a blocking issue.


    I think it /must/ be a blocking issue of some kind – because the url is passed direct to $.ajax, which (I've checked the source code) doesnt do any url checking before making the xhr request.

    But if the request isnt even being sent, it would have to be on the client side… could it be your firewall/antispyware/add-blocking software? What browsers have you tried?

    Also, I guess you put a full url into the browser – have you tried doing that for the grid url parameter?

    Mark

    in reply to: Change the navGrid options #90530
    Mark
    Participant

    If id is the id of your grid:

    $("#add_"+id+",#edit_"+id+",#del_"+id+")[disable?"hide":"show"]();

    Mark

    in reply to: Fails when certain URLs used for data #90523
    Mark
    Participant

    I had a similar issue (with different urls, though). It turned out to be mod_security running on my server. It basically checks the url for certain patterns, and rejects them if they match. I had a long battle with my service provider to get them to drop it…

    Since Im almost certain there's nothing on the client side that cares about the url, I'd guess you have the same issue.

    One way to test this is to just type the url into the address bar – if it fails, you know where the problem is…

    Also, if you have access to your server logs, you should be able to find the errors in there…

    Mark

    in reply to: intall 3.6 version #90517
    Mark
    Participant

    Sorry, this looks like it was caused by a bugfix I added.

    I dont think you actually need $.ui.multiselect to be loaded, but you do need jquery-ui to be loaded, if you include grid.jqueryui.js (of course, there's no point in including grid.jqueryui.js unless you're including jquery-ui anyway).

    Mark

    Mark
    Participant

    Yes, you're right – it would be good if the grid supported it directly.

    But a lot of people want to use the prebuilt compressed grid code – so a solution that doesnt involve changing grid code is also useful.

    Mark

    Mark
    Participant

    Rather than modifying grid code, you could use a beforeSelectRow handler…

    Mark

    in reply to: Hidden grid fields not copied to Edit Form #90099
    Mark
    Participant

    I think the way it works is that

Viewing 15 replies - 46 through 60 (of 104 total)

Stay connected with us in your favorite flavor!