I have created application .NET Core 3.x using razor pages. I am not sure how to binding works for the Igrid. Could you help me with binding works on this.
It's my cshtml.cs
public async Task OnGetAsync()
Role = await _context.Role
.Include(r => r.App).ToListAsync();
//GridModel gridModel = new GridModel();
//gridModel.ID = "grid1";
//gridModel.DataSource = _context.Role.AsQueryable();
//var paging = new GridPaging();
It's my razor page cshtml
column.For(x => x.RoleId).HeaderText("RoleId").Width("30%");
column.For(x => x.Description).HeaderText("Description").Width("30%");
I tried to upload the project file (zip) but I don't see it here
I can't open your sample project in VS2019. I am creating project in VS2019
I followed your code and copied your code to the index model but the grid is not showing on the page. After Welcome the page is empty
A possible reason for this exception could be if jQuery is loaded more than once within the application. Please keep in mind that by design the template for a Razor pages project has references for jQuery scripts in the _Layout.cshtml file. What I could suggest is removing the following lines of code from the _Layout.cshtml in the “Shared” folder:
<script src="~/js/site.js" asp-append-version="true"></script>
After removing the scripts, the grid should be rendered and populated with data by using .DataBind().
Additionally the system has rejected the project because of its size. If they are still problems with binding data to the grid, what I could suggest is uploading the project to a drive and sending me a link for the project.
Thank you. I created new .NET Core 3.1 project and removed all jQuery reference but still the grid is not visible on the page. you can see the page doesn't have any layout reference to bootstrap or jquery. Is there anything I need to setup in the startup project?
I use trial license is this something I need to check on. I am in the process of deciding to buy Infragistics so it's important for me to understand it clearly. Thank you.