ATaseski
ATaseski

Reputation: 17

DevExpress MVC ClientSideEvents hides the grid

I'm working on a DevExpress MVC GridView and everything is just fine until I put the following setting:

settings.ClientSideEvents.SelectionChanged = "SelectionChanged";

After this, the grid is "invisible"

When I check the code with Inspect element, I can see the code and when I go over the blocks with the mouse, the elements are highlighted (but not shown) see --> http://prntscr.com/5olbxp

I also wrote the function in the script section:

<script>
   function SelectionChanged(s,e) {
     ...
   }
</script>

I have no idea why the grid disappears :/

Upvotes: 1

Views: 1015

Answers (1)

Gosha_Fighten
Gosha_Fighten

Reputation: 3858

Your script should be defined before its using by the GridView. Move it at the top of your main view or before rendering the GridView's partial view.

Upvotes: 1

Related Questions