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
110
Custom Row Edit Dialog with igGrid and igCombo in dialog
posted

I'm using the Custom Row Edit Dialog to modify values in a iggrid. In the dialog, I want to render an igCombo and igGrid. Neither of these are used to directly edit values in the grid. The user will select something from the igCombo, which will populate a list in the dialog's igGrid. Then the user will select a row in the dialog's igGrid. Upon selection, the StartDate and EndDate input fields in the dialog will be updated. Clicking Done will update the StartDate and EndDate in the row being updated.

My question is, how do I put an igCombo and igGrid in the dialog. I'm using MVC and building a partial view for the contents of the dialog.

I followed the example in the documentation with the script tag. However, the igCombo and igGrid will not render in the dialog.

<script id="dialogTemplate" type="text/html"> 

If I change the script table to be a div, as follows, the igCombo and igGrid render twice in the dialog.

<div id="dialogTemplate" >
 

Since neither the igCombo nor igGrid are directly related to the fields in the grid row I'm updating, I cannot specify editors in the .ColumnSettings.




  • 23953
    Offline posted

    You have 2 options:

    1. Build your own dialog which when closed will call igGridUpdating.updateRow API to update the main grid.

    2. Requires you to implement custom Updating editor provider for the grid. You can see the "Editing: Custom Editor Provider" sample for reference implementation of an editor provider.

    Both of them require pure JavaScript implementation, but you could still use MVC for to initialize the grid.

    Hope this helps,
    Martin Pavlov
    Infragistics, Inc.