1

I am Using Ignite UI Control I am facing a sorting issue Let me explain the scenario

I am opening an igDialog and in that dialog box I am opening a Grid view using igGrid which looked like below

Fig(1) enter image description here

For the first time it working fine now when I click on each column is grid sorting is executed once but when I clicked on the add button the I replace the the dialog contents with the add content now this dialog box will be look like that.

Fig(2) enter image description here

When click on the cancel button Above it again load the content of listing view and show Fig (1).

The problem I faced is actually when I clicked on any column it called the sorting function twice and it hit my controller action twice.

No of times I go to add view and then back to list view it called sorting multiple times.

Now I don’t know what's happening here ?

Note : I am using $(gridId).igDialog("content", html); to loaded content dynamically

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100
Shahid Ahmad
  • 764
  • 1
  • 7
  • 15

1 Answers1

0

It would be better if you can include the code which handles the view changes inside the dialog. What you're describing sound like grid events are attached multiple times on the same elements. If you're not disposing the grid, or attaching custom events every time it's shown, then this would be the result.

I will update the answer to be more concrete once you include the code in the question.

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100