I have one view (ViewLeads) that only has an Infragistics grid already working and pulling data fine. I have another view (UpdateLead) where I have several textboxes which display the data in the grid when you click on a specific user.
What I want to do is add the infragistics grid to this new view (UpdateLead). The issue I'm running into is that in my first view(ViewLead) my model reference is...
@model IQueryable<LeadManagement.BusinessEntities.BusinessLead>
and further down I have my grid like..
@(Html.Infragistics()
.Grid(Model)
.ID("grid123")
.Width("100%")
.PrimaryKey("Lead_ID")
.AutoGenerateColumns(false)
.AutoGenerateLayouts(false)
.Columns(column =>
{
column.For(x => x.Lead_ID).Hidden(true);
onclick='return true;' />", "Lead_ID", "string", "3%") { Template = "<input type='checkbox' name='select'/>" });
style='color:blue;'>${Name}</a>").HeaderText("Name").Width("10%");
style='color:blue;'>${Name}</a>").HeaderText("Name").Width("10%");
column.For(x => x.Name).Template("<a href='UpdateLead?id=${Lead_ID}' style='color:blue;'>${Name}</a>").HeaderText("Name").Width("10%");
column.For(x => x.LeadCreationDate).HeaderText("Created").Width("8%");
column.For(x => x.Source).HeaderText("Source").Width("10%");
column.For(x => x.status).Template("<a href='#' style='color:blue;'>${status}</a>").HeaderText("Status").Width("10%");
column.For(x => x.Note).HeaderText("Notes").Width("10%");
column.For(x => x.Litigation).HeaderText("Type of Litigation").Width("12%");
column.For(x => x.originalFirm).HeaderText("Original Firm").Width("13%");
column.For(x => x.CurrentFirm).HeaderText("Current Firm").Width("13%");
column.Columns.Add(new GridColumn("Accept/Deny/Transfer", "Lead_ID", "string", "18%") { Template = "<input type='image' src='/Images/Accept.jpg' height='20' width='20' onclick='return Accepted(${Lead_ID})'/> <input type='image' src='/Images/Reject.png' height='20' width='20' onclick='return Rejected(${Lead_ID})'/> <input type='image' src='/Images/Transfer.png' height='20' width='20' id='InputAssignLead' onclick='return AssignLead(${Lead_ID})'/>" });
})
NOW...
On my other View (UpdateLead) since I have textboxes and stuff that I'm populating my model reference is..
@model LeadManagement.BusinessEntities.BusinessLead
and so when I try to copy my Grid code over to this view, it complain about the
.Grid(Model)
part, saying it has invalid argument, and Vice Versa if I change the model refernce to an Iqueryable reference the textboxes complain.
How can I have both on the same page (textboxes and grid)???? I've tried referencing both model types but that doesn't work either. I've been stuck on this for a couple days now. Thanks in advance!!
There could appear such problem when you didn't mentioned:
and your model like in example below
http://www.igniteui.com/grid/_ga=1.235256967.729368916.1477415519