Grid does not bind to List properly (SOLVED)

Hello. I have a Grid I am attempting to implement. I am currently using the standard ASP.NET DataGrid, which is working correctly with my List. I want to replace that DataGrid with a SyncFusion Grid, but the SyncFusion Grid refuses to work.

This is my grid code:

ASPX:
<asp:Content ID="Content5" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ej:Grid ID="foGrid" runat="server">
        <Columns>
            <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Center" Width="70" />
            <ej:Column Field="OrderDateTime" HeaderText="Order Date" Format="{0:MM/dd/yyyy}" TextAlign="Center" Width="80" />
            <ej:Column Field="SiteID" HeaderText="Site ID" Width="80" TextAlign="Center" />
            <ej:Column Field="valKey" HeaderText="Validation Key" TextAlign="Center" Width="150" />
            <ej:Column Field="ModelNumber" HeaderText="Model Number" TextAlign="Center" Width="100" />
            <ej:Column Field="FirstName" HeaderText="First Name" Width="100" />
            <ej:Column Field="LastName" HeaderText="Last Name" Width="125" />
            <ej:Column Field="Address" HeaderText="Address" Width="200" />
            <ej:Column Field="Address2" HeaderText="Address 2" Width="200" />
            <ej:Column Field="City" HeaderText="City" Width="150" />
            <ej:Column Field="State" HeaderText="State" Width="25" />
            <ej:Column Field="ZIP" HeaderText="ZIP" Width="30" />
            <ej:Column Field="Phone" HeaderText="Phone" Width="40" />
            <ej:Column Field="FailType" HeaderText="Failure Type" Width="100" />
        </Columns>
    </ej:Grid>
    <%--<asp:DataGrid ID="foGrid2" runat="server"></asp:DataGrid>--%>
</asp:Content>

ASPX.CS:
            var failedOrders = Administration.GetFailedOrders(Application["connString"].ToString());

            foGrid.DataSource = failedOrders;
            foGrid.DataBind();

When I run the code, all that shows up in the View Source is an empty DIV named "foGrid".

I'm sure I'm missing something simple, but for the life of me I can't figure out what.

3 Replies 1 reply marked as answer

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 17, 2020 02:28 PM UTC

Hi Nicholas, 

Thanks for contacting Syncfusion Support. 
 
Query#:- SyncFusion Grid refuses to work. 

From your query we suspect that the problem occurs when Scripts and CSS necessary to render Grid has not been referred properly in your project. So please ensure to refer below Script and CSS files in your project(Site.Master) file. 
 
Refer the necessary scripts and CSS based on the folder structure in the project as like given below in Site.Master.cs page 
 
 
Either you can refer the Cdn Links based on your required version as per your convenience 
 
 
Refer to the documentation link:- 
 
We have prepared sample to render Grid with List:- 
 
After referring the above documentation and Sample, still faced issue share us the following details. 
  1. Script Error (if any) on console window.
  2. Video Demo to replicate the issue(by opening the console window).
  3. Site.Master.cs File page.
  4. If possible replicate the issue in the above sample and revert us back.

Regards, 
Farveen sulthana T 


Marked as answer

NS Nicholas Scarpinato November 19, 2020 10:16 PM UTC

Thank you for the quick response. This solved the issue.


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 20, 2020 04:30 AM UTC

Hi Nicholas, 

Thanks for your update. Please get back to us if you need any further assistance. We are happy to assist you. 

Regards, 
Farveen sulthana T 


Loader.
Up arrow icon