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

populate grid columns only with if statement

1 Answer 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
maayan
Top achievements
Rank 1
maayan asked on 02 Sep 2014, 09:00 PM
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

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 03 Sep 2014, 11:08 AM
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.

 
Tags
Grid
Asked by
maayan
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or