You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x] Razor templating
[x] Content Types or data management
Current behavior
I want to check whether a columns has any values inside:
@functions{
System.Collections.Generic.Dictionary<string,bool> HasValues = new System.Collections.Generic.Dictionary<string,bool>();
bool Any(string colName){
if (HasValues.ContainsKey(colName)) return HasValues[colName];
var lang = Dnn.Tab.CultureCode;
var data = Data["Default"].LightList ;
var any = data.Any(o=> !string.IsNullOrWhiteSpace(o.Attributes[colName][lang].ToString()));
HasValues[colName] = any;
return any;
}
}
It fails now:
'IDataStream' does not contain a definition for 'LightList' and no extension method 'LightList' accepting a first argument of type 'IDataStream' Expected behavior LightList should work again
Minimal reproduction of the problem with instructions
Just copy the code in a razor script.
2sxc version(s): 9.8.0
Browser: all
DNN: all
Language: any
The text was updated successfully, but these errors were encountered:
@SCullman just fyi: "List" is what LightList used to be.
We had assumed nobody except for us (2sic) uses the LightList, so we didn't leave it in. I'll quickly do a review if we'll re-include it, but List is what you want to go for in the future.
I'm submitting a ...
[x] bug report
...about
[x] Razor templating
[x] Content Types or data management
Current behavior
I want to check whether a columns has any values inside:
It fails now:
'IDataStream' does not contain a definition for 'LightList' and no extension method 'LightList' accepting a first argument of type 'IDataStream'
Expected behavior
LightList should work again
Minimal reproduction of the problem with instructions
Just copy the code in a razor script.
The text was updated successfully, but these errors were encountered: