kuafusoft

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Author
    Replies
  • in reply to: How to populate dynamic context menus #98475
    kuafusoft
    Participant

    I've the same problem.

    Now I use the jquery contextmenu, but I don't know how to change the menu items according to the row content.

    Can anyone help me?

    in reply to: How to keep the tree expanded after edit a node #98468
    kuafusoft
    Participant

    I've found the setting of reloadAfterSubmit.

    Thanks.

    in reply to: How to keep the tree expanded after edit a node #98467
    kuafusoft
    Participant

    I've found the setting: reloadAfterSubmit.

    Thanks.

    in reply to: navGrid events in form #98317
    kuafusoft
    Participant

    You can define an event (onchange?) in editoptions of the first column (first list) to change the second list. Hope it helps.

    for example:

    in reply to: excel:true not working for me. #95190
    kuafusoft
    Participant

    I checked the source code of the example case and find that:

    jQuery('#grid').jqGrid('navGrid','#pager',{“edit”:false,”add”:false,”del”:false,”search”:true,”refresh”:true,”view”:false,”excel”:true},{“drag”:true,”resize”:true,”closeOnEscape”:true,”dataheight”:150,”mtype”:”POST”},{“drag”:true,”resize”:true,”closeOnEscape”:true,”dataheight”:150,”mtype”:”POST”},

    {“mtype”:”POST”},

    {“drag”:true,”closeAfterSearch”:true,”multipleSearch”:true},{“drag”:true,”resize”:true,”closeOnEscape”:true,”dataheight”:150});

    jQuery('#grid').jqGrid('navButtonAdd','#pager',{caption:'',title:'Export to Excel',onClickButton : function(e){
    try {
    jQuery(“#grid”).jqGrid('excelExport',{url:'grid.php'});
    } catch (e) {
    window.location= 'grid.php?oper=excel';
    }
    }});

    kuafusoft
    Participant

    Tony,

    I'm sorry for my poor english.

    Yes, we can launch the form by condition, but if i create my own form, i have to code for input valid checking, right? I think it's very convinient to set the formatter for cells (such as integer, email and custom formatter and which will trigger the front-end checking when submitted). And we just need a form to edit/new/view, but don't care the form is inline created or extern assigned (just assign a formId or form defined filename, I think assign a form defined file name will be better). All settings in colmodels, such as formatter should work without re-coding. That's why I want to increase parameter(s) in Grid to assign the formId(s), I think it can simplize the coding.

    Thanks.

    kuafusoft
    Participant

    In fact, I want to add the custom form like the following way:

    Add a new parameter for custom form (maybe more than one parameter, if consider the new form, edit form and view form), if there's no custom form assigned, create the default form, otherwise, use the custom form. Fill the custom form/defaut form with the rowdata and all settings in colmodels should work in default form or custom form.

    Is it possible?

    in reply to: change dataUrl method from get to post #91892
    kuafusoft
    Participant

    It seems there's an option for grid:

    ajaxSelectOptions /jqgridwiki/doku.php?id=wiki:options

    You can try to set it to {type:'POST'}.

    Maybe helpful.Laugh

    in reply to: How to make a row linkable? #91891
    kuafusoft
    Participant

    Tony,

    Thank you very much. I found a similar article:/blog/?page_id=393/discussion/selecting-row

    I tried the onCellSelect Event, yes, it's almost good enough. But there's no underline to tell the user that it can be clicked and I hope that only when the user click the text, the edit or view form pop up.

    Now I add a link after gridComplete event like “aaaa” for I can not get the rowId in custom format parameters. If I can get the gridId, I can do it with a custom formatter. How can I get the gridId just with jqgrid method?

    I'm a fool!!

    I can get the gridid:

    Can we put the gridId in the opt in formatter function? I looked the source code, it seems I can do it in formatter function in grid.base.js, about line 394.

    Thank you again.

    in reply to: selecting row? #91890
    kuafusoft
    Participant

    I need the feature too.

    I'm suggested to use the onCellSelect event to popup a form, yes, it almost good enough. but I still like a link.

    There's another way: using a custom formatter ( I don't think link format can cover it) to transfer the content to a link, just like:

    content

    But I can not get the gridid in custom formatter function. /jqgridwiki/doku.php?id=wiki:custom_formatter

    If jqgrid can save the gridid in its options, it will be very helpful.

    My poor english:(.

    in reply to: columns don’t fill the entire grid width #91888
    kuafusoft
    Participant

    I met the same problem.

    in reply to: How to make a row linkable? #91869
    kuafusoft
    Participant

    Tony,

    Sometimes we want to link to a javascript function, such as I met before: I want to edit the current row when I click a cell. It seems can not done by the link or showlink formatter.

    Regards.

    in reply to: How can I get the editOptions defined when calling navGrid #91833
    kuafusoft
    Participant

    Tony,

    I improved the function serialize2Str to get the function name from function handle. So I think the code can work now. but I don't think it's a good solution. I still suggest to modify the jqgrid code to improve the event handle(if

    in reply to: How can I get the editOptions defined when calling navGrid #91832
    kuafusoft
    Participant

    I should explain the environment of my application. PHP + mySql + jQuery.

    I want to use only one list.php to display all grid. the grid definition will be defined in other .php files. The list.php get the grid name from $_REQUEST then gets the grid definition with ajax and display it. Different grid has different options. So I have to pass some parameters to the grid definition. For example, for users management, when edit a user, we should disable the account, but when add a new user, we must enable the account. This action is done in beforeShowForm. But for other grid, there's no such problem. So I have to set the editOptions and some other options as parameters to pass to the list.php.

    in reply to: How can I get the editOptions defined when calling navGrid #91831
    kuafusoft
    Participant

    Tony,

    Thank you very much.

    I want to add a link to a field to edit the row. I used the following code:

    var disableAccount = function(formid){

Viewing 15 replies - 1 through 15 (of 15 total)

Stay connected with us in your favorite flavor!