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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Poluate grid with stored procedure

Thread ID:

Created:

Updated:

Platform:

Replies:

128239 Jan 10,2017 11:00 AM UTC Jan 12,2017 09:12 AM UTC ASP.NET Core 3
loading
Tags: Grid
Nicholas Picardi
Asked On January 10, 2017 11:00 AM UTC

Hi all,

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

thanks,
Nicholas

Venkatesh Ayothi Raman [Syncfusion]
Replied On 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
[GRID] 
<ej-grid id="FlatGrid" datasource="ViewBag.dataSource" allow-paging="true" load="onLoad" > 
 
        <e-columns> 
        . . . 
</e-columns> 
</ej-grid> 
 
[Server side] 
public IActionResult Index() 
        { 
 
            IEnumerable data; 
             
            //Get the data source from stored procedure 
 
            ViewBag.dataSource = data;  
            return View(); 
 
        } 
 
Online reference

Regards, 
Venkatesh Ayothiraman. 


Nicholas Picardi
Replied On January 11, 2017 11:31 AM UTC

Hi Venkatesh,

Thanks for the code.
It is what i needed.

Regards,
Nicholas

Mohammed Farook J [Syncfusion]
Replied On January 12, 2017 09:12 AM UTC

Hi Nicholas, 
  
Thanks for update. 
  
Regards, 
J.Mohammed Farook 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;