Grid.mvc - column containing iCollection -




my model contain collection of object. (any relation).

this.root_cause_categories = new hashset<root_cause_categories>();  

i added column using custom rendering htmlhelper.

columns.add(o => o.root_cause_categories).titled("category").sanitized(false).encoded(false).sortable(true).filterable(true).setfilterwidgettype("categoryfilterwidget")        .rendervalueas(o => customrenderingcategorycolumn(o)).css("text-center"); 

but seems filter not work collection.

error here in _grid.cshtml:

@helper rendergridbody() {     if (!model.itemstodisplay.any())     {   method 'system.string toupper()' declared on type 'system.string' cannot called instance of type 'system.collections.generic.icollection`1[ncqiap.root_cause_categories]'  

for information, others columns filters load ajax single values (string or number) filtered.

have try implemented mechanism allow gridmvc work property model of icollection.

for exemple :

studends follow courses. 1 course may followed many students

i table display courses followed student , filter 1 course.

thanks , best regards





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -