This is a migrated thread and some comments may be shown as answers.

foreign key column data viewdata not cleared

1 Answer 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pantulu
Top achievements
Rank 1
Pantulu asked on 16 Jun 2015, 01:27 PM

I am using a foreign key column in my grid, and populate the data from viewdata as below

 

              columns.ForeignKey(c => c.PersonId, (SelectList)ViewData["PersonSource"]);

 

I set the  ViewData["PersonSource"] at the page load and the values are updated correctly.

But in UI the column populates the values from the cache rather than the ViewData. It works fine if I manually clear the browser cache.

Anyways I can overcome this issue? 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 18 Jun 2015, 03:37 PM
Hi,

Perhaps the page is being cached. Could you try using the OutputCache attribute on the action that returns the view with the grid:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public ActionResult Index()


Regards,
Daniel
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Pantulu
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or