We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Issue while initializing grid in modal while recorddoubleclick event

i have taken two grids one on HTML page another one is in modal

When i double click on record of the grid on HTML page then i open one modal and in modal i have used another grid but while adding record in grid which is in modal then save and cancel toolbars not getting initialized.

I have created sample check on following link::

http://jsplayground.syncfusion.com/stcjvkcy

Sample

In that For modal i have defined ProductEditController in that

$scope.ScheduleEditSettings = { allowAdding: true, allowEditing: true, allowDeleting: true };

$scope.ScheduleToolbarSettings = { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] },


but when i open modal then grid get initialized in modal but when i add or edit record in grid in modal then save cancel tools from toolbar not get enabled

is there any issue for grid in modal ??

HTML code for modal







4 Replies

GO Gomtesh replied to Gomtesh Hatgine October 27, 2015 12:25 PM UTC

i have taken two grids one on HTML page another one is in modal

When i double click on record of the grid on HTML page then i open one modal and in modal i have used another grid but while adding record in grid which is in modal then save and cancel toolbars not getting initialized.

I have created sample check on following link::

http://jsplayground.syncfusion.com/stcjvkcy

Sample

In that For modal i have defined ProductEditController in that

$scope.ScheduleEditSettings = { allowAdding: true, allowEditing: true, allowDeleting: true };

$scope.ScheduleToolbarSettings = { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] },


but when i open modal then grid get initialized in modal but when i add or edit record in grid in modal then save cancel tools from toolbar not get enabled

is there any issue for grid in modal ??

HTML code for modal







HTML code for modal::

 <div ej-grid e-datasource="ScheduleData" e-columns="ScheduleColumns" e-editsettings="ScheduleEditSettings" e-actionbegin="ScheduleActionBegin"
                        e-actioncomplete="ScheduleActionComplete" e-toolbarsettings="ScheduleToolbarSettings">
 </div>


JK Jayaprakash Kamaraj Syncfusion Team October 28, 2015 11:41 AM UTC

Hi Gomtesh, 
The cause of the issue is that the id for Grid DOM element is undeclared. So, declare a unique “id” for every Grid DOM element. In Grid every action is performed based on its id.

Please refer to the below code example and sample,
Code:

<div class="panel-body" ng-controller="ProductListController">

        <div id="Grid1" ej-grid e-datasource="ProductData" e-columns="ProductColumns" e-editsettings="ProductEditSettings" e-toolbarsettings="ProductToolbarSettings" e-recorddoubleclick="ProductRecorddoubleclick" e-databound="ProductDataBound" e-actionbegin="ProductActionbegin">

        </div>
    </div>


Sample:
http://www.syncfusion.com/downloads/support/forum/120916/ze/angular_with_model-1167627873 
Refer to the Help document for more information, 
http://help.syncfusion.com/js/grid/getting-started#create-a-grid
Regards,
Jayaprakash K.


GO Gomtesh October 28, 2015 11:56 AM UTC

Hi Jayaprakash
Thanks for replying,
Your Solution is correct my issue get solved.
Thanks once again.


JK Jayaprakash Kamaraj Syncfusion Team October 29, 2015 06:20 AM UTC

Hi Gomtesh, 


 We are happy that the given solution resolved your issue.

 Please let us know if you have any other query.

Regards, 

Jayaprakash K.


Loader.
Live Chat Icon For mobile
Up arrow icon