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

Poluate grid with stored procedure

Hi all,

It's possible populate a ej-grid with a stored procedure?


3 Replies

VA Venkatesh Ayothi Raman Syncfusion Team January 11, 2017 11:24 AM UTC

Hi Nicholas, 

Thanks for contacting Syncfusion support. 

The Grid will populate the data in the form of IEnumerable. we can retrieve the data source from stored procedure and change the stored procedure result as IEnumerable and then bound the data to Grid its works normally. Please refer to the following code example and online forum, 
Code example
<ej-grid id="FlatGrid" datasource="ViewBag.dataSource" allow-paging="true" load="onLoad" > 
        . . . 
[Server side] 
public IActionResult Index() 
            IEnumerable data; 
            //Get the data source from stored procedure 
            ViewBag.dataSource = data;  
            return View(); 
Online reference

Venkatesh Ayothiraman. 

NP Nicholas Picardi January 11, 2017 11:31 AM UTC

Hi Venkatesh,

Thanks for the code.
It is what i needed.


MF Mohammed Farook J Syncfusion Team January 12, 2017 09:12 AM UTC

Hi Nicholas, 
Thanks for update. 
J.Mohammed Farook 

Live Chat Icon For mobile
Up arrow icon