Styve

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • in reply to: edittype select => moving to index on edit #85069
    Styve
    Participant

    A kick Google search this morning shows me that I was wrong..:) I was thinking the onInitializationForm was a grid Event and not a NavGrid event…

    I should be ok by now :) I should have search more before posting, sorry for the trouble.

    The code (without moving to selectedIndex, just hooking on onInitializeForm) :

    jQuery(”#grid-equipement”).navGrid(”#pager-equipement”,
    {refresh: true, edit: true, add: true, del: true, search: false, position:”left”},
    {onInitializeForm:function(formId){alert(’ok’);}});

    Thanks for you time

    Solution (because I hate when I find a post in a forum that talks about my problem but didn’t explain how to fix it. :) )

    NOTE : I use the pluggin to manipulate the select
    http://www.texotela.co.uk/code/jquery/select/

    jQuery(”#grid-equipement”).navGrid(”#pager-equipement”,
    {refresh: true, edit: true, add: true, del: true, search: false, position:”left”},
    {
    // Edit option.
    beforeShowForm:function(formId){
    //$(”#dateFabrication”, formId).datepicker({dateFormat:”yyyy-mm-dd”});

    // Ajustement des selects.
    var rowId, selectValue;
    rowId = $(”#grid-equipement”).getGridParam(”selrow”);
    // Type équipement.
    selectValue = $(”#grid-equipement”).getCell(rowId, 5);
    $(”#typeId”).selectOptions(selectValue, true);
    // Fournisseur.
    selectValue = $(”#grid-equipement”).getCell(rowId, 7);
    $(”#fournisseurId”).selectOptions(selectValue, true);

    },
    },
    {
    // Add option.
    });

Viewing 1 replies (of 1 total)

Stay connected with us in your favorite flavor!