Mark

Forum Replies Created

Viewing 15 replies - 61 through 75 (of 104 total)
  • Author
    Replies
  • in reply to: Custom column sort function #90098
    Mark
    Participant

    Cant you just write a custom unformat function that converts the formatted cell back to a sortable value?

    Mark

    Mark
    Participant

    You can write a beforeSelectRow handler. Here's a link to one I wrote – it doesnt do exactly what you want, but its easy to modify (note that the variable scb is true iff the user clicked on the checkbox):

    Forum

    Mark

    in reply to: Autowidth with jquery Tabs #90005
    Mark
    Participant

    Well, use the tabselect event, and keep a flag to say whether or not you've created the grid…

    Mark

    in reply to: Autowidth with jquery Tabs #89956
    Mark
    Participant

    It'll do that if you create it every time the tab is selected.

    I recommend creating it once, the first time its selected, and never again…

    Mark

    in reply to: Hidden fields not posted during editGridRow #89872
    Mark
    Participant

    So a quick check suggests this is working. I've also looked at the code, and it seems to do exactly the right thing…

    One thought – are you sure your database didnt get corrupted by your earlier experiments?

    ie is it possible that the cd_id and cd_table fields really are the same for those two records (even thought they should be different).

    Mark

    in reply to: ShowHideCol function bug #89869
    Mark
    Participant

    Unfortunately you'll have to fix a lot of other cases too. colModel.width is assumed to be an integer all over the place.

    The best fix (unless tony goes to the trouble of fixing every use of colModel width) is to supply integer values for the widths…

    Mark

    in reply to: Hidden fields not posted during editGridRow #89867
    Mark
    Participant

    Sounds like a bug…

    I've been assuming this is working for me, but havent tested this scenario beyond things looking about right. I may have the same problem in my grid – I'll have to test it.

    Mark

    in reply to: getRowData while editing a row #89866
    Mark
    Participant

    But I've tried it, and it does work 🙂

    Make sure you're calling it with the correct id…

    Mark

    in reply to: getRowData while editing a row #89859
    Mark
    Participant

    Why not just call saveRow from your external function, before calling getRowData…

    Mark

    in reply to: Hidden fields not posted during editGridRow #89856
    Mark
    Participant

    I think you want the fields to be editable:true, hidden:true, edithidden:false.

    Mark

    in reply to: setSelection bug? #89714
    Mark
    Participant

    You're setting the id as an integer, rather than a string (you want “5” rather than 5).

    This was fixed a few weeks ago – although Im not sure its in the 3.5.3 release.

    Mark

    in reply to: Missing example on demo page – scrolling load data #89692
    Mark
    Participant

    Hi Tony,

    No problem – the “true” vs 1 is a little odd.

    My logic was that I didnt want to change the behavior of existing scroll=true grids (except to make the scrolling work better). For grids of up to a few hundred rows, its probably better to just keep everything loaded.

    And also, I could use eg scroll=n to limit the number of loaded pages – I just hadnt got around to doing it.

    Just curious – is your sortableRows built on top of sortable? Or is there some fundamental problem with sortable and table rows?

    Mark

    in reply to: Missing example on demo page – scrolling load data #89680
    Mark
    Participant

    Hi Tony,

    Thanks – I'll fix the addXMLData parameter.

    I think the changes you suggest to enable you to explicitly position the scroll bar should be pretty easy to add on top of my changes.

    If you set scroll=1 (rather than true), then it already swaps rows in and out to keep just the needed rows in the DOM. Grab the scrollbar, and scroll down. The display in bottom right will show you “view – 5301-5330 of 15000″ for example.

    The algorithm right now is: if more rows are needed at the bottom of the grid, but some of the loaded rows are visible, then append some pages. Otherwise, empty the grid, and just fetch enough pages to cover the visible region.

    So, if you scroll down slowly enough, you /can/ get all the rows in the DOM, even with scroll=1. But generally, that wont happen (I've been using this for a few days in my own grid). I should probably tweak the algorithm to additionally throw away rows when you go over some specified threshold.

    Also, scrolling backwards is less efficient than scrolling forwards, because it always fetches everything it needs. I need to make some changes to addXmlData and addJSONData to handle inserting new rows ahead of existing ones…

    Mark

    in reply to: Missing example on demo page – scrolling load data #89675
    Mark
    Participant

    Since this is requested many times – the plan is to have this in 3.7 release.


    Tony,

    Ive been working on this for my project… I just pushed the current implementation to markw65/jqGrid.

    Basically, it extends the behavior of the existing “scroll” option:

    in reply to: Implement grid event and call default event behavior? #89663
    Mark
    Participant

    Unfortunately, the exact way to do this varies depending on the callback, but for the beforeSelectRow, just return “true”.

    Mark

Viewing 15 replies - 61 through 75 (of 104 total)

Stay connected with us in your favorite flavor!