Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
270
Dynamic ValueList - Last possible moment
posted

Hey All ...

Problem/Setup:

I have an UltraGrid that is bound to an UltraDataSource to get data.  I need to define a ValueList (limit to list) at the Cell Level.  The values in the ValueList are not dependant on any other column value.  The values in the ValueList are going to be defined by a value in the underylying data.  I cannot populate the value based on CellUpdate or CellChange, because its not based on any values in the grid.

How do I dynamically put a different ValueList in a cell when I programmatically change a value on the underlying entity?

I could trap the Grid.InitializeRow event to check the underlying entity to determine what values go in the ValueList.  That covers the initial creation.  But, if a user changes any value on that row, to a different value ... that could possibly trigger a new ValueList to be generated.  I would need to trap the AfterCellUpdate for every single Cell to basically create a new ValueList and attach it to the correct Cell (for that Row).

Ideally, it would be best to trap it at the UltraDataSource.CellDataRequested level (Last possible moment), Get The ValueList, attach it to the Cell, and then allow the CellDataRequested Event to continue - in that fashion, the Cell's ValueList would be present before the Cell get's its Actual Value.  I could manipulate the CacheData variable on the UltraDataSource to trigger the CellDataRequested for ValueList Changes.  Unfortunately, I don't think that is possible ... right?

Unless there is another "Hook" I could tap into that happens just before the CellDataRequested event fires?

Parents Reply Children