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

Call action/controller from ej-tile

Hi Syncfusion support

I'm try to navigate using tile to action/controller; but stuck to implement it; can you help me

        <e-menu-item url="" text="JH Management">
            <e-menu-child-items>
                <e-menu-child-item>
                    <e-content-template>
                        <div class="e-tile-group">
                            <div class="e-tile-column">
                                <div class="e-tile-small-col-2">
                                    <ej-tile id="tile2a" image-position="@TileImagePosition.Center" tile-size="@TileSize.Small" image-url="../images/tile/windows/alerts.png" ></ej-tile>
                                </div>
                            </div>
                        </div>
                    </e-content-template>
                </e-menu-child-item>
            </e-menu-child-items>
        </e-menu-item>

Thanks for your help

3 Replies

SS Selvamani Sankarappan Syncfusion Team September 14, 2017 06:12 AM UTC

Hi Haryzad, 
 
Thanks for contacting Syncfusion support. 
 
You can navigate to the controller while clicking the Tile control using AJAX post at mouse-down event. Please refer to the following code example: 
 
[cshtml] 
<div class="e-tile-group"> 
      <div class="e-tile-column"> 
          <div class="e-tile-small-col-2"> 
               <ej-tile id="tile2a" image-position="@TileImagePosition.Center" tile-size="@TileSize.Small" image-url="http://aspnetcore.syncfusion.com/images/tile/windows/alerts.png" mouse-down="onClick"></ej-tile> 
          </div> 
      </div> 
  </div> 
 
[script] 
function onClick(args) { 
            $.ajax({ 
                 url: "Home/Filter", 
                 type: 'POST', 
                 dataType: "json", 
                 success: function (result) { 
 
                 } 
            }); 
        }   
 
[cs] 
[HttpPost] 
  public IActionResult Filter() { 
        return View(); 
  }    
 
Refer to the following sample: 
 
If the above does not meet your requirement, kindly share us the more details or modified sample to provide an appropriate solution at the earliest. 
 
Regards, 
 
Selvamani S. 



HA haryzad September 20, 2017 07:40 AM UTC

Hi Selvamani S.

Thanks for the support, not sure why my ajax code not working.

I try alternative using this below code temporary for the navigation.

<script type="text/javascript">

    function potentiallist() {

        window.location.rel='nofollow' href = "/PotentialJH/Index";

    }

</script>





SS Selvamani Sankarappan Syncfusion Team September 21, 2017 09:47 AM UTC

Hi Haryzad,   
   
Thanks for the update.   
   
We have given the AJAX action. Also, you can use the window.location.rel='nofollow' href to navigate the controller action.    
   
Please let us know if you need any further assistance.   
  
Regards,   
  
Selvamani S.  


Loader.
Up arrow icon