This question is locked. New answers and comments are not allowed.
Hello,
I have the following code:
I get 3 records on the inital view. But when i refresh I only get 1 record back but both Controller functions have the same linq query
here is the controller code, how do i make this work right?
I have the following code:
<% Html.Telerik().Grid<BuyOffersTable>() .BindTo(Model) .DataKeys(datakeys => datakeys.Add(c => c.BuyOfferGUID)) .DataBinding(dataBinding => dataBinding.Ajax().Select("_BuyOffersTablesBinding", "BuyLetters")) .Name("BuyOffersTable") .Columns(columns => { columns.Bound(o => o.BuyOfferGUID).Hidden(true); columns.Bound(o => o.BuyOfferGUID).ClientTemplate("<a href='" + Url.Action("RequestDetails") + "/<#=BuyOfferGUID #>Select</a>") .Template(o => { %><%=Html.ActionLink("B"+o.BuyOfferNumer, "BuyLetters", new { id = o.BuyOfferGUID })%><% }).Title(""); columns.Bound(o => o.BuyOfferNumer).ClientTemplate("B<#=BuyOfferNumer #>").Template(o => { %>B<%=o.BuyOfferNumer%><% }).Title("Offer #"); columns.Bound(o => o.Createdate).Title("Created"); columns.Bound(o => o.FirstName).Title("First Name"); columns.Bound(o => o.LastName).Title("Last Name"); }) .Sortable() .Scrollable() .Pageable() .Render();%>I get 3 records on the inital view. But when i refresh I only get 1 record back but both Controller functions have the same linq query
here is the controller code, how do i make this work right?
[GridAction] public ActionResult _BuyOffersTablesBinding() { WebEntities storedb = new WebEntities(); IQueryable<BuyOffersTable> BuyOffersTables = storedb.BuyOffersTables; BuyOffersTables = from o in BuyOffersTables where o.Processed == false select o; return View(new GridModel(BuyOffersTables)); } public ActionResult ProcessIncoming() { WebEntities storedb = new WebEntities(); IQueryable<BuyOffersTable> BuyOffersTables = storedb.BuyOffersTables; BuyOffersTables = from o in BuyOffersTables where o.Processed == false select o; return View(BuyOffersTables); }