Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2048
igGrid Updating and RowEditTemplate edit mode
posted

Hi,

I am using 12.2 versione and I changed GridEditMode.Row into GridEditMode.RowEditTemplate. Dialog is very cool, but I would like to understand better this kind of updating...

  1. To run the saveChanges method as in the GridEditMode.Row I changed the iggridupdatingrowaddedor iggridupdatingeditrowended event into iggridupdatingroweditdialogclosed event. Here I just check if a Done or a Cancel button was clicked before the occur of this event.
    Is this correct from your point of view? Or is there a better way to do it?
    Just to be clear, this was a sample of the old code:
        $("#grid_one").live('iggridupdatingrowadded', function () {
            $("#grid_one").igGrid("saveChanges");
        });
    And this is a sample of the new code:
        $("#grid_one").live('iggridupdatingroweditdialogclosed', function (event, ui) {
            if (event.buttons == 0) { // Ok button
                $("#grid_one").igGrid("saveChanges");
            }
        });
  2. Width and Height seem to not work...I tried different numbers (in pixel), but nothing happened. My code is right, because in the same way I am able to change Done and Cancel buttons length:
        GridUpdating updating = new GridUpdating();
        .....
        updating.RowEditDialogWidth = "400";   // or "400px"
        updating.RowEditDialogHeight = "200";   // or "200px"
        updating.RowEditDialogOkCancelButtonWidth = "70";   /or "70px"
        .....
        gridModel.Features.Add(updating);
    Buttons are rendered right, while dialog dimensions are still default ones. Is there something I am missing? For example I noted that to correctly render validators in the dialog I had to put a BodyAsParent to false...maybe I am forgetting a simple parameter...
  3. Is there the possibility to freeze the dialog without let the user resizing it?

Thank you veru much,

Flavio