Skip to content

Fluent Grid conditional column content #704

Answered by vnbaaij
madcoda9000 asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, I didn't notice the use of context...What if you move the condition inside the <TemplateColumn>, i.e.:

<TemplateColumn>
    @if(context.IsLdapLogin) {
             <span>true</span>
           } else {
              <span>false</span>
     }
</TemplateColumn>

I' think context will then be of type TGridItem but not sure. Maybe you need to navigate up in your class /data model (ie something like context.Row...)

For second part. if you need to know data from the actual item that is not going to work I think. Like I sad, I did not notice the 'context' use

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@madcoda9000
Comment options

@vnbaaij
Comment options

Answer selected by madcoda9000
@madcoda9000
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants