populate grid columns only with if statement

2 posts, 0 answers
  1. maayan
    maayan avatar
    5 posts
    Member since:
    Aug 2014

    Posted 02 Sep 2014 Link to this post

    hello everyone

    can u please tell me if i can populate grid columns only with certain conditions 

    something like this 

       columns.Bound(c => c.ID).Title(ViewBag.SearchBy+" id").HtmlAttributes(new { @class = "search_by_id" });
                columns.Bound(c => c.Clicks);
    if(1>0)
    {
                columns.Bound(c => c.Conversions).Title("Conversions");
                columns.Bound(c => c.ConversionRate).Title("Conversion rate").Format("{0:p1}"); ;
    }

    thank u
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2310 posts

    Posted 03 Sep 2014 Link to this post

    Hello,


    The current configuration seems correct. You could include any valid boolean expression in the condition. Are you experiencing any issues on your end?

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top